//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension IoT {
    // MARK: Enums

    public enum AbortAction: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cancel = "CANCEL"
        public var description: String { return self.rawValue }
    }

    public enum ActionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case connect = "CONNECT"
        case publish = "PUBLISH"
        case receive = "RECEIVE"
        case subscribe = "SUBSCRIBE"
        public var description: String { return self.rawValue }
    }

    public enum AggregationTypeName: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cardinality = "Cardinality"
        case percentiles = "Percentiles"
        case statistics = "Statistics"
        public var description: String { return self.rawValue }
    }

    public enum AlertTargetType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case sns = "SNS"
        public var description: String { return self.rawValue }
    }

    public enum ApplicationProtocol: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case `default` = "DEFAULT"
        case https = "HTTPS"
        case mqttWss = "MQTT_WSS"
        case secureMqtt = "SECURE_MQTT"
        public var description: String { return self.rawValue }
    }

    public enum AuditCheckRunStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case canceled = "CANCELED"
        case completedCompliant = "COMPLETED_COMPLIANT"
        case completedNonCompliant = "COMPLETED_NON_COMPLIANT"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case waitingForDataCollection = "WAITING_FOR_DATA_COLLECTION"
        public var description: String { return self.rawValue }
    }

    public enum AuditFindingSeverity: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case critical = "CRITICAL"
        case high = "HIGH"
        case low = "LOW"
        case medium = "MEDIUM"
        public var description: String { return self.rawValue }
    }

    public enum AuditFrequency: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case biweekly = "BIWEEKLY"
        case daily = "DAILY"
        case monthly = "MONTHLY"
        case weekly = "WEEKLY"
        public var description: String { return self.rawValue }
    }

    public enum AuditMitigationActionsExecutionStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case canceled = "CANCELED"
        case completed = "COMPLETED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case pending = "PENDING"
        case skipped = "SKIPPED"
        public var description: String { return self.rawValue }
    }

    public enum AuditMitigationActionsTaskStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case canceled = "CANCELED"
        case completed = "COMPLETED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        public var description: String { return self.rawValue }
    }

    public enum AuditNotificationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case sns = "SNS"
        public var description: String { return self.rawValue }
    }

    public enum AuditTaskStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case canceled = "CANCELED"
        case completed = "COMPLETED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        public var description: String { return self.rawValue }
    }

    public enum AuditTaskType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case onDemandAuditTask = "ON_DEMAND_AUDIT_TASK"
        case scheduledAuditTask = "SCHEDULED_AUDIT_TASK"
        public var description: String { return self.rawValue }
    }

    public enum AuthDecision: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case allowed = "ALLOWED"
        case explicitDeny = "EXPLICIT_DENY"
        case implicitDeny = "IMPLICIT_DENY"
        public var description: String { return self.rawValue }
    }

    public enum AuthenticationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case `default` = "DEFAULT"
        case awsSigv4 = "AWS_SIGV4"
        case awsX509 = "AWS_X509"
        case customAuth = "CUSTOM_AUTH"
        case customAuthX509 = "CUSTOM_AUTH_X509"
        public var description: String { return self.rawValue }
    }

    public enum AuthorizerStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case inactive = "INACTIVE"
        public var description: String { return self.rawValue }
    }

    public enum AutoRegistrationStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disable = "DISABLE"
        case enable = "ENABLE"
        public var description: String { return self.rawValue }
    }

    public enum AwsJobAbortCriteriaAbortAction: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cancel = "CANCEL"
        public var description: String { return self.rawValue }
    }

    public enum AwsJobAbortCriteriaFailureType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case all = "ALL"
        case failed = "FAILED"
        case rejected = "REJECTED"
        case timedOut = "TIMED_OUT"
        public var description: String { return self.rawValue }
    }

    public enum BehaviorCriteriaType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case `static` = "STATIC"
        case machineLearning = "MACHINE_LEARNING"
        case statistical = "STATISTICAL"
        public var description: String { return self.rawValue }
    }

    public enum CACertificateStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case inactive = "INACTIVE"
        public var description: String { return self.rawValue }
    }

    public enum CACertificateUpdateAction: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case deactivate = "DEACTIVATE"
        public var description: String { return self.rawValue }
    }

    public enum CannedAccessControlList: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case `private` = "private"
        case authenticatedRead = "authenticated-read"
        case awsExecRead = "aws-exec-read"
        case bucketOwnerFullControl = "bucket-owner-full-control"
        case bucketOwnerRead = "bucket-owner-read"
        case logDeliveryWrite = "log-delivery-write"
        case publicRead = "public-read"
        case publicReadWrite = "public-read-write"
        public var description: String { return self.rawValue }
    }

    public enum CertificateMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case `default` = "DEFAULT"
        case sniOnly = "SNI_ONLY"
        public var description: String { return self.rawValue }
    }

    public enum CertificateProviderOperation: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case createCertificateFromCsr = "CreateCertificateFromCsr"
        public var description: String { return self.rawValue }
    }

    public enum CertificateStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case inactive = "INACTIVE"
        case pendingActivation = "PENDING_ACTIVATION"
        case pendingTransfer = "PENDING_TRANSFER"
        case registerInactive = "REGISTER_INACTIVE"
        case revoked = "REVOKED"
        public var description: String { return self.rawValue }
    }

    public enum CommandExecutionStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case created = "CREATED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case rejected = "REJECTED"
        case succeeded = "SUCCEEDED"
        case timedOut = "TIMED_OUT"
        public var description: String { return self.rawValue }
    }

    public enum CommandNamespace: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case awsIoT = "AWS-IoT"
        case awsIoTFleetWise = "AWS-IoT-FleetWise"
        public var description: String { return self.rawValue }
    }

    public enum ComparisonOperator: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case greaterThan = "greater-than"
        case greaterThanEquals = "greater-than-equals"
        case inCidrSet = "in-cidr-set"
        case inPortSet = "in-port-set"
        case inSet = "in-set"
        case lessThan = "less-than"
        case lessThanEquals = "less-than-equals"
        case notInCidrSet = "not-in-cidr-set"
        case notInPortSet = "not-in-port-set"
        case notInSet = "not-in-set"
        public var description: String { return self.rawValue }
    }

    public enum ConfidenceLevel: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case high = "HIGH"
        case low = "LOW"
        case medium = "MEDIUM"
        public var description: String { return self.rawValue }
    }

    public enum ConfigName: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case certAgeThresholdInDays = "CERT_AGE_THRESHOLD_IN_DAYS"
        case certExpirationThresholdInDays = "CERT_EXPIRATION_THRESHOLD_IN_DAYS"
        public var description: String { return self.rawValue }
    }

    public enum CustomMetricType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case ipAddressList = "ip-address-list"
        case number = "number"
        case numberList = "number-list"
        case stringList = "string-list"
        public var description: String { return self.rawValue }
    }

    public enum DayOfWeek: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case fri = "FRI"
        case mon = "MON"
        case sat = "SAT"
        case sun = "SUN"
        case thu = "THU"
        case tue = "TUE"
        case wed = "WED"
        public var description: String { return self.rawValue }
    }

    public enum DetectMitigationActionExecutionStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case skipped = "SKIPPED"
        case successful = "SUCCESSFUL"
        public var description: String { return self.rawValue }
    }

    public enum DetectMitigationActionsTaskStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case canceled = "CANCELED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case successful = "SUCCESSFUL"
        public var description: String { return self.rawValue }
    }

    public enum DeviceCertificateUpdateAction: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case deactivate = "DEACTIVATE"
        public var description: String { return self.rawValue }
    }

    public enum DeviceDefenderIndexingMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case off = "OFF"
        case violations = "VIOLATIONS"
        public var description: String { return self.rawValue }
    }

    public enum DimensionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case topicFilter = "TOPIC_FILTER"
        public var description: String { return self.rawValue }
    }

    public enum DimensionValueOperator: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case `in` = "IN"
        case notIn = "NOT_IN"
        public var description: String { return self.rawValue }
    }

    public enum DisconnectReasonValue: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case authError = "AUTH_ERROR"
        case clientError = "CLIENT_ERROR"
        case clientInitiatedDisconnect = "CLIENT_INITIATED_DISCONNECT"
        case connectionLost = "CONNECTION_LOST"
        case customauthTtlExpiration = "CUSTOMAUTH_TTL_EXPIRATION"
        case duplicateClientid = "DUPLICATE_CLIENTID"
        case forbiddenAccess = "FORBIDDEN_ACCESS"
        case mqttKeepAliveTimeout = "MQTT_KEEP_ALIVE_TIMEOUT"
        case none = "NONE"
        case serverError = "SERVER_ERROR"
        case serverInitiatedDisconnect = "SERVER_INITIATED_DISCONNECT"
        case throttled = "THROTTLED"
        case unknown = "UNKNOWN"
        case websocketTtlExpiration = "WEBSOCKET_TTL_EXPIRATION"
        public var description: String { return self.rawValue }
    }

    public enum DomainConfigurationStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum DomainType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case awsManaged = "AWS_MANAGED"
        case customerManaged = "CUSTOMER_MANAGED"
        case endpoint = "ENDPOINT"
        public var description: String { return self.rawValue }
    }

    public enum DynamicGroupStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case building = "BUILDING"
        case rebuilding = "REBUILDING"
        public var description: String { return self.rawValue }
    }

    public enum DynamoKeyType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case number = "NUMBER"
        case string = "STRING"
        public var description: String { return self.rawValue }
    }

    public enum EventType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case caCertificate = "CA_CERTIFICATE"
        case certificate = "CERTIFICATE"
        case job = "JOB"
        case jobExecution = "JOB_EXECUTION"
        case policy = "POLICY"
        case thing = "THING"
        case thingGroup = "THING_GROUP"
        case thingGroupHierarchy = "THING_GROUP_HIERARCHY"
        case thingGroupMembership = "THING_GROUP_MEMBERSHIP"
        case thingType = "THING_TYPE"
        case thingTypeAssociation = "THING_TYPE_ASSOCIATION"
        public var description: String { return self.rawValue }
    }

    public enum FieldType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case boolean = "Boolean"
        case number = "Number"
        case string = "String"
        public var description: String { return self.rawValue }
    }

    public enum FleetMetricUnit: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case bits = "Bits"
        case bitsSecond = "Bits/Second"
        case bytes = "Bytes"
        case bytesSecond = "Bytes/Second"
        case count = "Count"
        case countSecond = "Count/Second"
        case gigabits = "Gigabits"
        case gigabitsSecond = "Gigabits/Second"
        case gigabytes = "Gigabytes"
        case gigabytesSecond = "Gigabytes/Second"
        case kilobits = "Kilobits"
        case kilobitsSecond = "Kilobits/Second"
        case kilobytes = "Kilobytes"
        case kilobytesSecond = "Kilobytes/Second"
        case megabits = "Megabits"
        case megabitsSecond = "Megabits/Second"
        case megabytes = "Megabytes"
        case megabytesSecond = "Megabytes/Second"
        case microseconds = "Microseconds"
        case milliseconds = "Milliseconds"
        case none = "None"
        case percent = "Percent"
        case seconds = "Seconds"
        case terabits = "Terabits"
        case terabitsSecond = "Terabits/Second"
        case terabytes = "Terabytes"
        case terabytesSecond = "Terabytes/Second"
        public var description: String { return self.rawValue }
    }

    public enum IndexStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case building = "BUILDING"
        case rebuilding = "REBUILDING"
        public var description: String { return self.rawValue }
    }

    public enum JobEndBehavior: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cancel = "CANCEL"
        case forceCancel = "FORCE_CANCEL"
        case stopRollout = "STOP_ROLLOUT"
        public var description: String { return self.rawValue }
    }

    public enum JobExecutionFailureType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case all = "ALL"
        case failed = "FAILED"
        case rejected = "REJECTED"
        case timedOut = "TIMED_OUT"
        public var description: String { return self.rawValue }
    }

    public enum JobExecutionStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case canceled = "CANCELED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case queued = "QUEUED"
        case rejected = "REJECTED"
        case removed = "REMOVED"
        case succeeded = "SUCCEEDED"
        case timedOut = "TIMED_OUT"
        public var description: String { return self.rawValue }
    }

    public enum JobStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case canceled = "CANCELED"
        case completed = "COMPLETED"
        case deletionInProgress = "DELETION_IN_PROGRESS"
        case inProgress = "IN_PROGRESS"
        case scheduled = "SCHEDULED"
        public var description: String { return self.rawValue }
    }

    public enum LogLevel: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case debug = "DEBUG"
        case disabled = "DISABLED"
        case error = "ERROR"
        case info = "INFO"
        case warn = "WARN"
        public var description: String { return self.rawValue }
    }

    public enum LogTargetType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case `default` = "DEFAULT"
        case clientId = "CLIENT_ID"
        case principalId = "PRINCIPAL_ID"
        case sourceIp = "SOURCE_IP"
        case thingGroup = "THING_GROUP"
        public var description: String { return self.rawValue }
    }

    public enum MessageFormat: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case json = "JSON"
        case raw = "RAW"
        public var description: String { return self.rawValue }
    }

    public enum MitigationActionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case addThingsToThingGroup = "ADD_THINGS_TO_THING_GROUP"
        case enableIotLogging = "ENABLE_IOT_LOGGING"
        case publishFindingToSns = "PUBLISH_FINDING_TO_SNS"
        case replaceDefaultPolicyVersion = "REPLACE_DEFAULT_POLICY_VERSION"
        case updateCaCertificate = "UPDATE_CA_CERTIFICATE"
        case updateDeviceCertificate = "UPDATE_DEVICE_CERTIFICATE"
        public var description: String { return self.rawValue }
    }

    public enum ModelStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case expired = "EXPIRED"
        case pendingBuild = "PENDING_BUILD"
        public var description: String { return self.rawValue }
    }

    public enum NamedShadowIndexingMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case off = "OFF"
        case on = "ON"
        public var description: String { return self.rawValue }
    }

    public enum OTAUpdateStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case createComplete = "CREATE_COMPLETE"
        case createFailed = "CREATE_FAILED"
        case createInProgress = "CREATE_IN_PROGRESS"
        case createPending = "CREATE_PENDING"
        case deleteFailed = "DELETE_FAILED"
        case deleteInProgress = "DELETE_IN_PROGRESS"
        public var description: String { return self.rawValue }
    }

    public enum PackageVersionAction: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case deprecate = "DEPRECATE"
        case publish = "PUBLISH"
        public var description: String { return self.rawValue }
    }

    public enum PackageVersionStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case deprecated = "DEPRECATED"
        case draft = "DRAFT"
        case published = "PUBLISHED"
        public var description: String { return self.rawValue }
    }

    public enum PolicyTemplateName: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case blankPolicy = "BLANK_POLICY"
        public var description: String { return self.rawValue }
    }

    public enum ReportType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case errors = "ERRORS"
        case results = "RESULTS"
        public var description: String { return self.rawValue }
    }

    public enum ResourceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case accountSettings = "ACCOUNT_SETTINGS"
        case caCertificate = "CA_CERTIFICATE"
        case clientId = "CLIENT_ID"
        case cognitoIdentityPool = "COGNITO_IDENTITY_POOL"
        case deviceCertificate = "DEVICE_CERTIFICATE"
        case iamRole = "IAM_ROLE"
        case iotPolicy = "IOT_POLICY"
        case issuerCertificate = "ISSUER_CERTIFICATE"
        case roleAlias = "ROLE_ALIAS"
        public var description: String { return self.rawValue }
    }

    public enum RetryableFailureType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case all = "ALL"
        case failed = "FAILED"
        case timedOut = "TIMED_OUT"
        public var description: String { return self.rawValue }
    }

    public enum SbomValidationErrorCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case fileSizeLimitExceeded = "FILE_SIZE_LIMIT_EXCEEDED"
        case incompatibleFormat = "INCOMPATIBLE_FORMAT"
        public var description: String { return self.rawValue }
    }

    public enum SbomValidationResult: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case failed = "FAILED"
        case succeeded = "SUCCEEDED"
        public var description: String { return self.rawValue }
    }

    public enum SbomValidationStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case succeeded = "SUCCEEDED"
        public var description: String { return self.rawValue }
    }

    public enum ServerCertificateStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case invalid = "INVALID"
        case valid = "VALID"
        public var description: String { return self.rawValue }
    }

    public enum ServiceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case credentialProvider = "CREDENTIAL_PROVIDER"
        case data = "DATA"
        case jobs = "JOBS"
        public var description: String { return self.rawValue }
    }

    public enum SortOrder: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case ascending = "ASCENDING"
        case descending = "DESCENDING"
        public var description: String { return self.rawValue }
    }

    public enum Status: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cancelled = "Cancelled"
        case cancelling = "Cancelling"
        case completed = "Completed"
        case failed = "Failed"
        case inProgress = "InProgress"
        public var description: String { return self.rawValue }
    }

    public enum TargetFieldOrder: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case latLon = "LatLon"
        case lonLat = "LonLat"
        public var description: String { return self.rawValue }
    }

    public enum TargetSelection: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case continuous = "CONTINUOUS"
        case snapshot = "SNAPSHOT"
        public var description: String { return self.rawValue }
    }

    public enum TemplateType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case fleetProvisioning = "FLEET_PROVISIONING"
        case jitp = "JITP"
        public var description: String { return self.rawValue }
    }

    public enum ThingConnectivityIndexingMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case off = "OFF"
        case status = "STATUS"
        public var description: String { return self.rawValue }
    }

    public enum ThingGroupIndexingMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case off = "OFF"
        case on = "ON"
        public var description: String { return self.rawValue }
    }

    public enum ThingIndexingMode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case off = "OFF"
        case registry = "REGISTRY"
        case registryAndShadow = "REGISTRY_AND_SHADOW"
        public var description: String { return self.rawValue }
    }

    public enum ThingPrincipalType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case exclusiveThing = "EXCLUSIVE_THING"
        case nonExclusiveThing = "NON_EXCLUSIVE_THING"
        public var description: String { return self.rawValue }
    }

    public enum TopicRuleDestinationStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case deleting = "DELETING"
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        case error = "ERROR"
        case inProgress = "IN_PROGRESS"
        public var description: String { return self.rawValue }
    }

    public enum VerificationState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case benignPositive = "BENIGN_POSITIVE"
        case falsePositive = "FALSE_POSITIVE"
        case truePositive = "TRUE_POSITIVE"
        case unknown = "UNKNOWN"
        public var description: String { return self.rawValue }
    }

    public enum ViolationEventType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case alarmCleared = "alarm-cleared"
        case alarmInvalidated = "alarm-invalidated"
        case inAlarm = "in-alarm"
        public var description: String { return self.rawValue }
    }

    public enum `Protocol`: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case http = "HTTP"
        case mqtt = "MQTT"
        public var description: String { return self.rawValue }
    }

    public enum AssetPropertyVariant: AWSEncodableShape & AWSDecodableShape, Sendable {
        /// Optional. A string that contains the boolean value (true or false) of the value entry. Accepts substitution templates.
        case booleanValue(String)
        /// Optional. A string that contains the double value of the value entry. Accepts substitution templates.
        case doubleValue(String)
        /// Optional. A string that contains the integer value of the value entry. Accepts substitution templates.
        case integerValue(String)
        /// Optional. The string value of the value entry. Accepts substitution templates.
        case stringValue(String)

        public init(from decoder: Decoder) throws {
            let container = try decoder.container(keyedBy: CodingKeys.self)
            guard container.allKeys.count == 1, let key = container.allKeys.first else {
                let context = DecodingError.Context(
                    codingPath: container.codingPath,
                    debugDescription: "Expected exactly one key, but got \(container.allKeys.count)"
                )
                throw DecodingError.dataCorrupted(context)
            }
            switch key {
            case .booleanValue:
                let value = try container.decode(String.self, forKey: .booleanValue)
                self = .booleanValue(value)
            case .doubleValue:
                let value = try container.decode(String.self, forKey: .doubleValue)
                self = .doubleValue(value)
            case .integerValue:
                let value = try container.decode(String.self, forKey: .integerValue)
                self = .integerValue(value)
            case .stringValue:
                let value = try container.decode(String.self, forKey: .stringValue)
                self = .stringValue(value)
            }
        }

        public func encode(to encoder: Encoder) throws {
            var container = encoder.container(keyedBy: CodingKeys.self)
            switch self {
            case .booleanValue(let value):
                try container.encode(value, forKey: .booleanValue)
            case .doubleValue(let value):
                try container.encode(value, forKey: .doubleValue)
            case .integerValue(let value):
                try container.encode(value, forKey: .integerValue)
            case .stringValue(let value):
                try container.encode(value, forKey: .stringValue)
            }
        }

        public func validate(name: String) throws {
            switch self {
            case .stringValue(let value):
                try self.validate(value, name: "stringValue", parent: name, max: 1024)
                try self.validate(value, name: "stringValue", parent: name, min: 1)
            default:
                break
            }
        }

        private enum CodingKeys: String, CodingKey {
            case booleanValue = "booleanValue"
            case doubleValue = "doubleValue"
            case integerValue = "integerValue"
            case stringValue = "stringValue"
        }
    }

    // MARK: Shapes

    public struct AbortConfig: AWSEncodableShape & AWSDecodableShape {
        /// The list of criteria that determine when and how to abort the job.
        public let criteriaList: [AbortCriteria]

        @inlinable
        public init(criteriaList: [AbortCriteria]) {
            self.criteriaList = criteriaList
        }

        public func validate(name: String) throws {
            try self.criteriaList.forEach {
                try $0.validate(name: "\(name).criteriaList[]")
            }
            try self.validate(self.criteriaList, name: "criteriaList", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case criteriaList = "criteriaList"
        }
    }

    public struct AbortCriteria: AWSEncodableShape & AWSDecodableShape {
        /// The type of job action to take to initiate the job abort.
        public let action: AbortAction
        /// The type of job execution failures that can initiate a job abort.
        public let failureType: JobExecutionFailureType
        /// The minimum number of things which must receive job execution notifications before the job can be aborted.
        public let minNumberOfExecutedThings: Int
        /// The minimum percentage of job execution failures that must occur to initiate the job abort. Amazon Web Services IoT Core supports up to two digits after the decimal (for example, 10.9 and 10.99, but not 10.999).
        public let thresholdPercentage: Double

        @inlinable
        public init(action: AbortAction, failureType: JobExecutionFailureType, minNumberOfExecutedThings: Int, thresholdPercentage: Double) {
            self.action = action
            self.failureType = failureType
            self.minNumberOfExecutedThings = minNumberOfExecutedThings
            self.thresholdPercentage = thresholdPercentage
        }

        public func validate(name: String) throws {
            try self.validate(self.minNumberOfExecutedThings, name: "minNumberOfExecutedThings", parent: name, min: 1)
            try self.validate(self.thresholdPercentage, name: "thresholdPercentage", parent: name, max: 100.0)
        }

        private enum CodingKeys: String, CodingKey {
            case action = "action"
            case failureType = "failureType"
            case minNumberOfExecutedThings = "minNumberOfExecutedThings"
            case thresholdPercentage = "thresholdPercentage"
        }
    }

    public struct AcceptCertificateTransferRequest: AWSEncodableShape {
        /// The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String
        /// Specifies whether the certificate is active.
        public let setAsActive: Bool?

        @inlinable
        public init(certificateId: String, setAsActive: Bool? = nil) {
            self.certificateId = certificateId
            self.setAsActive = setAsActive
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.certificateId, key: "certificateId")
            request.encodeQuery(self.setAsActive, key: "setAsActive")
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "^(0x)?[a-fA-F0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct Action: AWSEncodableShape & AWSDecodableShape {
        /// Change the state of a CloudWatch alarm.
        public let cloudwatchAlarm: CloudwatchAlarmAction?
        /// Send data to CloudWatch Logs.
        public let cloudwatchLogs: CloudwatchLogsAction?
        /// Capture a CloudWatch metric.
        public let cloudwatchMetric: CloudwatchMetricAction?
        /// Write to a DynamoDB table.
        public let dynamoDB: DynamoDBAction?
        /// Write to a DynamoDB table. This is a new version of the DynamoDB action. It allows you to write each attribute in an MQTT message payload into a separate DynamoDB column.
        public let dynamoDBv2: DynamoDBv2Action?
        /// Write data to an Amazon OpenSearch Service domain.  The Elasticsearch action can only be used by existing rule actions.  To create a new rule action or to update an existing rule action, use the OpenSearch rule action instead. For more information, see  OpenSearchAction.
        public let elasticsearch: ElasticsearchAction?
        /// Write to an Amazon Kinesis Firehose stream.
        public let firehose: FirehoseAction?
        /// Send data to an HTTPS endpoint.
        public let http: HttpAction?
        /// Sends message data to an IoT Analytics channel.
        public let iotAnalytics: IotAnalyticsAction?
        /// Sends an input to an IoT Events detector.
        public let iotEvents: IotEventsAction?
        /// Sends data from the MQTT message that triggered the rule to IoT SiteWise asset properties.
        public let iotSiteWise: IotSiteWiseAction?
        /// Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster.
        public let kafka: KafkaAction?
        /// Write data to an Amazon Kinesis stream.
        public let kinesis: KinesisAction?
        /// Invoke a Lambda function.
        public let lambda: LambdaAction?
        /// The Amazon Location Service rule action sends device location updates from an MQTT message to an Amazon Location tracker resource.
        public let location: LocationAction?
        /// Write data to an Amazon OpenSearch Service domain.
        public let openSearch: OpenSearchAction?
        /// Publish to another MQTT topic.
        public let republish: RepublishAction?
        /// Write to an Amazon S3 bucket.
        public let s3: S3Action?
        /// Send a message to a Salesforce IoT Cloud Input Stream.
        public let salesforce: SalesforceAction?
        /// Publish to an Amazon SNS topic.
        public let sns: SnsAction?
        /// Publish to an Amazon SQS queue.
        public let sqs: SqsAction?
        /// Starts execution of a Step Functions state machine.
        public let stepFunctions: StepFunctionsAction?
        /// The Timestream rule action writes attributes (measures) from an MQTT message into an Amazon Timestream table. For more information, see the Timestream topic rule action documentation.
        public let timestream: TimestreamAction?

        @inlinable
        public init(cloudwatchAlarm: CloudwatchAlarmAction? = nil, cloudwatchLogs: CloudwatchLogsAction? = nil, cloudwatchMetric: CloudwatchMetricAction? = nil, dynamoDB: DynamoDBAction? = nil, dynamoDBv2: DynamoDBv2Action? = nil, elasticsearch: ElasticsearchAction? = nil, firehose: FirehoseAction? = nil, http: HttpAction? = nil, iotAnalytics: IotAnalyticsAction? = nil, iotEvents: IotEventsAction? = nil, iotSiteWise: IotSiteWiseAction? = nil, kafka: KafkaAction? = nil, kinesis: KinesisAction? = nil, lambda: LambdaAction? = nil, location: LocationAction? = nil, openSearch: OpenSearchAction? = nil, republish: RepublishAction? = nil, s3: S3Action? = nil, salesforce: SalesforceAction? = nil, sns: SnsAction? = nil, sqs: SqsAction? = nil, stepFunctions: StepFunctionsAction? = nil, timestream: TimestreamAction? = nil) {
            self.cloudwatchAlarm = cloudwatchAlarm
            self.cloudwatchLogs = cloudwatchLogs
            self.cloudwatchMetric = cloudwatchMetric
            self.dynamoDB = dynamoDB
            self.dynamoDBv2 = dynamoDBv2
            self.elasticsearch = elasticsearch
            self.firehose = firehose
            self.http = http
            self.iotAnalytics = iotAnalytics
            self.iotEvents = iotEvents
            self.iotSiteWise = iotSiteWise
            self.kafka = kafka
            self.kinesis = kinesis
            self.lambda = lambda
            self.location = location
            self.openSearch = openSearch
            self.republish = republish
            self.s3 = s3
            self.salesforce = salesforce
            self.sns = sns
            self.sqs = sqs
            self.stepFunctions = stepFunctions
            self.timestream = timestream
        }

        public func validate(name: String) throws {
            try self.elasticsearch?.validate(name: "\(name).elasticsearch")
            try self.firehose?.validate(name: "\(name).firehose")
            try self.http?.validate(name: "\(name).http")
            try self.iotEvents?.validate(name: "\(name).iotEvents")
            try self.iotSiteWise?.validate(name: "\(name).iotSiteWise")
            try self.kafka?.validate(name: "\(name).kafka")
            try self.openSearch?.validate(name: "\(name).openSearch")
            try self.republish?.validate(name: "\(name).republish")
            try self.salesforce?.validate(name: "\(name).salesforce")
            try self.timestream?.validate(name: "\(name).timestream")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudwatchAlarm = "cloudwatchAlarm"
            case cloudwatchLogs = "cloudwatchLogs"
            case cloudwatchMetric = "cloudwatchMetric"
            case dynamoDB = "dynamoDB"
            case dynamoDBv2 = "dynamoDBv2"
            case elasticsearch = "elasticsearch"
            case firehose = "firehose"
            case http = "http"
            case iotAnalytics = "iotAnalytics"
            case iotEvents = "iotEvents"
            case iotSiteWise = "iotSiteWise"
            case kafka = "kafka"
            case kinesis = "kinesis"
            case lambda = "lambda"
            case location = "location"
            case openSearch = "openSearch"
            case republish = "republish"
            case s3 = "s3"
            case salesforce = "salesforce"
            case sns = "sns"
            case sqs = "sqs"
            case stepFunctions = "stepFunctions"
            case timestream = "timestream"
        }
    }

    public struct ActiveViolation: AWSDecodableShape {
        /// The behavior that is being violated.
        public let behavior: Behavior?
        /// The time the most recent violation occurred.
        public let lastViolationTime: Date?
        /// The value of the metric (the measurement) that caused the most recent violation.
        public let lastViolationValue: MetricValue?
        /// The security profile with the behavior is in violation.
        public let securityProfileName: String?
        /// The name of the thing responsible for the active violation.
        public let thingName: String?
        /// The verification state of the violation (detect alarm).
        public let verificationState: VerificationState?
        /// The description of the verification state of the violation.
        public let verificationStateDescription: String?
        ///  The details of a violation event.
        public let violationEventAdditionalInfo: ViolationEventAdditionalInfo?
        /// The ID of the active violation.
        public let violationId: String?
        /// The time the violation started.
        public let violationStartTime: Date?

        @inlinable
        public init(behavior: Behavior? = nil, lastViolationTime: Date? = nil, lastViolationValue: MetricValue? = nil, securityProfileName: String? = nil, thingName: String? = nil, verificationState: VerificationState? = nil, verificationStateDescription: String? = nil, violationEventAdditionalInfo: ViolationEventAdditionalInfo? = nil, violationId: String? = nil, violationStartTime: Date? = nil) {
            self.behavior = behavior
            self.lastViolationTime = lastViolationTime
            self.lastViolationValue = lastViolationValue
            self.securityProfileName = securityProfileName
            self.thingName = thingName
            self.verificationState = verificationState
            self.verificationStateDescription = verificationStateDescription
            self.violationEventAdditionalInfo = violationEventAdditionalInfo
            self.violationId = violationId
            self.violationStartTime = violationStartTime
        }

        private enum CodingKeys: String, CodingKey {
            case behavior = "behavior"
            case lastViolationTime = "lastViolationTime"
            case lastViolationValue = "lastViolationValue"
            case securityProfileName = "securityProfileName"
            case thingName = "thingName"
            case verificationState = "verificationState"
            case verificationStateDescription = "verificationStateDescription"
            case violationEventAdditionalInfo = "violationEventAdditionalInfo"
            case violationId = "violationId"
            case violationStartTime = "violationStartTime"
        }
    }

    public struct AddThingToBillingGroupRequest: AWSEncodableShape {
        /// The ARN of the billing group.
        public let billingGroupArn: String?
        /// The name of the billing group.  This call is asynchronous. It might take several seconds for the detachment to propagate.
        public let billingGroupName: String?
        /// The ARN of the thing to be added to the billing group.
        public let thingArn: String?
        /// The name of the thing to be added to the billing group.
        public let thingName: String?

        @inlinable
        public init(billingGroupArn: String? = nil, billingGroupName: String? = nil, thingArn: String? = nil, thingName: String? = nil) {
            self.billingGroupArn = billingGroupArn
            self.billingGroupName = billingGroupName
            self.thingArn = thingArn
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, max: 128)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, min: 1)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case billingGroupArn = "billingGroupArn"
            case billingGroupName = "billingGroupName"
            case thingArn = "thingArn"
            case thingName = "thingName"
        }
    }

    public struct AddThingToBillingGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AddThingToThingGroupRequest: AWSEncodableShape {
        /// Override dynamic thing groups with static thing groups when 10-group limit is
        /// 			reached. If a thing belongs to 10 thing groups, and one or more of those groups are
        /// 			dynamic thing groups, adding a thing to a static group removes the thing from the last
        /// 			dynamic group.
        public let overrideDynamicGroups: Bool?
        /// The ARN of the thing to add to a group.
        public let thingArn: String?
        /// The ARN of the group to which you are adding a thing.
        public let thingGroupArn: String?
        /// The name of the group to which you are adding a thing.
        public let thingGroupName: String?
        /// The name of the thing to add to a group.
        public let thingName: String?

        @inlinable
        public init(overrideDynamicGroups: Bool? = nil, thingArn: String? = nil, thingGroupArn: String? = nil, thingGroupName: String? = nil, thingName: String? = nil) {
            self.overrideDynamicGroups = overrideDynamicGroups
            self.thingArn = thingArn
            self.thingGroupArn = thingGroupArn
            self.thingGroupName = thingGroupName
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case overrideDynamicGroups = "overrideDynamicGroups"
            case thingArn = "thingArn"
            case thingGroupArn = "thingGroupArn"
            case thingGroupName = "thingGroupName"
            case thingName = "thingName"
        }
    }

    public struct AddThingToThingGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AddThingsToThingGroupParams: AWSEncodableShape & AWSDecodableShape {
        /// Specifies if this mitigation action can move the things that triggered the mitigation action even if they are part of one or more dynamic thing groups.
        public let overrideDynamicGroups: Bool?
        /// The list of groups to which you want to add the things that triggered the mitigation action. You can add a thing to a maximum of 10 groups, but you can't add a thing to more than one group in the same hierarchy.
        public let thingGroupNames: [String]

        @inlinable
        public init(overrideDynamicGroups: Bool? = nil, thingGroupNames: [String]) {
            self.overrideDynamicGroups = overrideDynamicGroups
            self.thingGroupNames = thingGroupNames
        }

        public func validate(name: String) throws {
            try self.thingGroupNames.forEach {
                try validate($0, name: "thingGroupNames[]", parent: name, max: 128)
                try validate($0, name: "thingGroupNames[]", parent: name, min: 1)
                try validate($0, name: "thingGroupNames[]", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            }
            try self.validate(self.thingGroupNames, name: "thingGroupNames", parent: name, max: 10)
            try self.validate(self.thingGroupNames, name: "thingGroupNames", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case overrideDynamicGroups = "overrideDynamicGroups"
            case thingGroupNames = "thingGroupNames"
        }
    }

    public struct AggregationType: AWSEncodableShape & AWSDecodableShape {
        /// The name of the aggregation type.
        public let name: AggregationTypeName
        /// A list of the values of aggregation types.
        public let values: [String]?

        @inlinable
        public init(name: AggregationTypeName, values: [String]? = nil) {
            self.name = name
            self.values = values
        }

        public func validate(name: String) throws {
            try self.values?.forEach {
                try validate($0, name: "values[]", parent: name, max: 12)
                try validate($0, name: "values[]", parent: name, min: 1)
                try validate($0, name: "values[]", parent: name, pattern: "^[a-zA-Z0-9]+$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case values = "values"
        }
    }

    public struct AlertTarget: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the notification target to which alerts are sent.
        public let alertTargetArn: String
        /// The ARN of the role that grants permission to send alerts to the  notification target.
        public let roleArn: String

        @inlinable
        public init(alertTargetArn: String, roleArn: String) {
            self.alertTargetArn = alertTargetArn
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case alertTargetArn = "alertTargetArn"
            case roleArn = "roleArn"
        }
    }

    public struct Allowed: AWSDecodableShape {
        /// A list of policies that allowed the authentication.
        public let policies: [Policy]?

        @inlinable
        public init(policies: [Policy]? = nil) {
            self.policies = policies
        }

        private enum CodingKeys: String, CodingKey {
            case policies = "policies"
        }
    }

    public struct AssetPropertyTimestamp: AWSEncodableShape & AWSDecodableShape {
        /// Optional. A string that contains the nanosecond time offset. Accepts substitution templates.
        public let offsetInNanos: String?
        /// A string that contains the time in seconds since epoch. Accepts substitution templates.
        public let timeInSeconds: String

        @inlinable
        public init(offsetInNanos: String? = nil, timeInSeconds: String) {
            self.offsetInNanos = offsetInNanos
            self.timeInSeconds = timeInSeconds
        }

        private enum CodingKeys: String, CodingKey {
            case offsetInNanos = "offsetInNanos"
            case timeInSeconds = "timeInSeconds"
        }
    }

    public struct AssetPropertyValue: AWSEncodableShape & AWSDecodableShape {
        /// Optional. A string that describes the quality of the value. Accepts substitution templates. Must be GOOD, BAD, or UNCERTAIN.
        public let quality: String?
        /// The asset property value timestamp.
        public let timestamp: AssetPropertyTimestamp
        /// The value of the asset property.
        public let value: AssetPropertyVariant

        @inlinable
        public init(quality: String? = nil, timestamp: AssetPropertyTimestamp, value: AssetPropertyVariant) {
            self.quality = quality
            self.timestamp = timestamp
            self.value = value
        }

        public func validate(name: String) throws {
            try self.value.validate(name: "\(name).value")
        }

        private enum CodingKeys: String, CodingKey {
            case quality = "quality"
            case timestamp = "timestamp"
            case value = "value"
        }
    }

    public struct AssociateSbomWithPackageVersionRequest: AWSEncodableShape {
        /// A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
        public let clientToken: String?
        /// The name of the new software package.
        public let packageName: String
        public let sbom: Sbom
        /// The name of the new package version.
        public let versionName: String

        @inlinable
        public init(clientToken: String? = AssociateSbomWithPackageVersionRequest.idempotencyToken(), packageName: String, sbom: Sbom, versionName: String) {
            self.clientToken = clientToken
            self.packageName = packageName
            self.sbom = sbom
            self.versionName = versionName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.clientToken, key: "clientToken")
            request.encodePath(self.packageName, key: "packageName")
            try container.encode(self.sbom, forKey: .sbom)
            request.encodePath(self.versionName, key: "versionName")
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 36)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^\\S{36,64}$")
            try self.validate(self.packageName, name: "packageName", parent: name, max: 128)
            try self.validate(self.packageName, name: "packageName", parent: name, min: 1)
            try self.validate(self.packageName, name: "packageName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
            try self.sbom.validate(name: "\(name).sbom")
            try self.validate(self.versionName, name: "versionName", parent: name, max: 64)
            try self.validate(self.versionName, name: "versionName", parent: name, min: 1)
            try self.validate(self.versionName, name: "versionName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case sbom = "sbom"
        }
    }

    public struct AssociateSbomWithPackageVersionResponse: AWSDecodableShape {
        /// The name of the new software package.
        public let packageName: String?
        public let sbom: Sbom?
        /// The status of the initial validation for the software bill of materials against the Software Package Data Exchange (SPDX) and CycloneDX industry standard formats.
        public let sbomValidationStatus: SbomValidationStatus?
        /// The name of the new package version.
        public let versionName: String?

        @inlinable
        public init(packageName: String? = nil, sbom: Sbom? = nil, sbomValidationStatus: SbomValidationStatus? = nil, versionName: String? = nil) {
            self.packageName = packageName
            self.sbom = sbom
            self.sbomValidationStatus = sbomValidationStatus
            self.versionName = versionName
        }

        private enum CodingKeys: String, CodingKey {
            case packageName = "packageName"
            case sbom = "sbom"
            case sbomValidationStatus = "sbomValidationStatus"
            case versionName = "versionName"
        }
    }

    public struct AssociateTargetsWithJobRequest: AWSEncodableShape {
        /// An optional comment string describing why the job was associated with the targets.
        public let comment: String?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String
        /// The namespace used to indicate that a job is a customer-managed job. When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.  $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/   The namespaceId feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.
        public let namespaceId: String?
        /// A list of thing group ARNs that define the targets of the job.
        public let targets: [String]

        @inlinable
        public init(comment: String? = nil, jobId: String, namespaceId: String? = nil, targets: [String]) {
            self.comment = comment
            self.jobId = jobId
            self.namespaceId = namespaceId
            self.targets = targets
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.comment, forKey: .comment)
            request.encodePath(self.jobId, key: "jobId")
            request.encodeQuery(self.namespaceId, key: "namespaceId")
            try container.encode(self.targets, forKey: .targets)
        }

        public func validate(name: String) throws {
            try self.validate(self.comment, name: "comment", parent: name, max: 2028)
            try self.validate(self.comment, name: "comment", parent: name, pattern: "^[^\\p{C}]+$")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.targets.forEach {
                try validate($0, name: "targets[]", parent: name, max: 2048)
            }
            try self.validate(self.targets, name: "targets", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case comment = "comment"
            case targets = "targets"
        }
    }

    public struct AssociateTargetsWithJobResponse: AWSDecodableShape {
        /// A short text description of the job.
        public let description: String?
        /// An ARN identifying the job.
        public let jobArn: String?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String?

        @inlinable
        public init(description: String? = nil, jobArn: String? = nil, jobId: String? = nil) {
            self.description = description
            self.jobArn = jobArn
            self.jobId = jobId
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case jobArn = "jobArn"
            case jobId = "jobId"
        }
    }

    public struct AttachPolicyRequest: AWSEncodableShape {
        /// The name of the policy to attach.
        public let policyName: String
        /// The identity to which the policy is attached. For example, a thing group or a certificate.
        public let target: String

        @inlinable
        public init(policyName: String, target: String) {
            self.policyName = policyName
            self.target = target
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.policyName, key: "policyName")
            try container.encode(self.target, forKey: .target)
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[\\w+=,.@-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case target = "target"
        }
    }

    public struct AttachPrincipalPolicyRequest: AWSEncodableShape {
        /// The policy name.
        public let policyName: String
        /// The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.
        public let principal: String

        @inlinable
        public init(policyName: String, principal: String) {
            self.policyName = policyName
            self.principal = principal
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.policyName, key: "policyName")
            request.encodeHeader(self.principal, key: "x-amzn-iot-principal")
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[\\w+=,.@-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct AttachSecurityProfileRequest: AWSEncodableShape {
        /// The security profile that is attached.
        public let securityProfileName: String
        /// The ARN of the target (thing group) to which the security profile is attached.
        public let securityProfileTargetArn: String

        @inlinable
        public init(securityProfileName: String, securityProfileTargetArn: String) {
            self.securityProfileName = securityProfileName
            self.securityProfileTargetArn = securityProfileTargetArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.securityProfileName, key: "securityProfileName")
            request.encodeQuery(self.securityProfileTargetArn, key: "securityProfileTargetArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct AttachSecurityProfileResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AttachThingPrincipalRequest: AWSEncodableShape {
        /// The principal, which can be a certificate ARN (as returned from the
        /// 			CreateCertificate operation) or an Amazon Cognito ID.
        public let principal: String
        /// The name of the thing.
        public let thingName: String
        /// The type of the relation you want to specify when you attach a principal to a thing.    EXCLUSIVE_THING - Attaches the specified principal to the specified thing, exclusively.
        /// 						The thing will be the only thing that’s attached to the principal.      NON_EXCLUSIVE_THING - Attaches the specified principal to the specified thing.
        /// 						Multiple things can be attached to the principal.
        public let thingPrincipalType: ThingPrincipalType?

        @inlinable
        public init(principal: String, thingName: String, thingPrincipalType: ThingPrincipalType? = nil) {
            self.principal = principal
            self.thingName = thingName
            self.thingPrincipalType = thingPrincipalType
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeHeader(self.principal, key: "x-amzn-principal")
            request.encodePath(self.thingName, key: "thingName")
            request.encodeQuery(self.thingPrincipalType, key: "thingPrincipalType")
        }

        public func validate(name: String) throws {
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct AttachThingPrincipalResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AttributePayload: AWSEncodableShape & AWSDecodableShape {
        /// A JSON string containing up to three key-value pair in JSON format. For example:  {\"attributes\":{\"string1\":\"string2\"}}
        public let attributes: [String: String]?
        /// Specifies whether the list of attributes provided in the AttributePayload is merged with
        /// 			the attributes stored in the registry, instead of overwriting them. To remove an attribute, call UpdateThing with an empty attribute value.  The merge attribute is only valid when calling UpdateThing or UpdateThingGroup.
        public let merge: Bool?

        @inlinable
        public init(attributes: [String: String]? = nil, merge: Bool? = nil) {
            self.attributes = attributes
            self.merge = merge
        }

        public func validate(name: String) throws {
            try self.attributes?.forEach {
                try validate($0.key, name: "attributes.key", parent: name, max: 128)
                try validate($0.key, name: "attributes.key", parent: name, pattern: "^[a-zA-Z0-9_.,@/:#-]+$")
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, max: 800)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, pattern: "^[a-zA-Z0-9_.,@/:#=\\[\\]-]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "attributes"
            case merge = "merge"
        }
    }

    public struct AuditCheckConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A structure containing the configName and corresponding configValue for configuring audit checks.
        public let configuration: [ConfigName: String]?
        /// True if this audit check is enabled for this account.
        public let enabled: Bool?

        @inlinable
        public init(configuration: [ConfigName: String]? = nil, enabled: Bool? = nil) {
            self.configuration = configuration
            self.enabled = enabled
        }

        public func validate(name: String) throws {
            try self.configuration?.forEach {
                try validate($0.value, name: "configuration[\"\($0.key)\"]", parent: name, max: 64)
                try validate($0.value, name: "configuration[\"\($0.key)\"]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case configuration = "configuration"
            case enabled = "enabled"
        }
    }

    public struct AuditCheckDetails: AWSDecodableShape {
        /// True if the check is complete and found all resources compliant.
        public let checkCompliant: Bool?
        /// The completion status of this check. One of "IN_PROGRESS", "WAITING_FOR_DATA_COLLECTION", "CANCELED", "COMPLETED_COMPLIANT", "COMPLETED_NON_COMPLIANT", or "FAILED".
        public let checkRunStatus: AuditCheckRunStatus?
        /// The code of any error encountered when this check is performed during this audit. One of "INSUFFICIENT_PERMISSIONS" or "AUDIT_CHECK_DISABLED".
        public let errorCode: String?
        /// The message associated with any error encountered when this check is performed during this audit.
        public let message: String?
        /// The number of resources that were found noncompliant during the check.
        public let nonCompliantResourcesCount: Int64?
        ///  Describes how many of the non-compliant resources created during the evaluation of an audit check were marked as suppressed.
        public let suppressedNonCompliantResourcesCount: Int64?
        /// The number of resources on which the check was performed.
        public let totalResourcesCount: Int64?

        @inlinable
        public init(checkCompliant: Bool? = nil, checkRunStatus: AuditCheckRunStatus? = nil, errorCode: String? = nil, message: String? = nil, nonCompliantResourcesCount: Int64? = nil, suppressedNonCompliantResourcesCount: Int64? = nil, totalResourcesCount: Int64? = nil) {
            self.checkCompliant = checkCompliant
            self.checkRunStatus = checkRunStatus
            self.errorCode = errorCode
            self.message = message
            self.nonCompliantResourcesCount = nonCompliantResourcesCount
            self.suppressedNonCompliantResourcesCount = suppressedNonCompliantResourcesCount
            self.totalResourcesCount = totalResourcesCount
        }

        private enum CodingKeys: String, CodingKey {
            case checkCompliant = "checkCompliant"
            case checkRunStatus = "checkRunStatus"
            case errorCode = "errorCode"
            case message = "message"
            case nonCompliantResourcesCount = "nonCompliantResourcesCount"
            case suppressedNonCompliantResourcesCount = "suppressedNonCompliantResourcesCount"
            case totalResourcesCount = "totalResourcesCount"
        }
    }

    public struct AuditFinding: AWSDecodableShape {
        /// The audit check that generated this result.
        public let checkName: String?
        /// A unique identifier for this set of audit findings. This identifier is used to apply mitigation tasks to one or more sets of findings.
        public let findingId: String?
        /// The time the result (finding) was discovered.
        public let findingTime: Date?
        ///  Indicates whether the audit finding was suppressed or not during reporting.
        public let isSuppressed: Bool?
        /// The resource that was found to be noncompliant with the audit check.
        public let nonCompliantResource: NonCompliantResource?
        /// The reason the resource was noncompliant.
        public let reasonForNonCompliance: String?
        /// A code that indicates the reason that the resource was noncompliant.
        public let reasonForNonComplianceCode: String?
        /// The list of related resources.
        public let relatedResources: [RelatedResource]?
        /// The severity of the result (finding).
        public let severity: AuditFindingSeverity?
        /// The ID of the audit that generated this result (finding).
        public let taskId: String?
        /// The time the audit started.
        public let taskStartTime: Date?

        @inlinable
        public init(checkName: String? = nil, findingId: String? = nil, findingTime: Date? = nil, isSuppressed: Bool? = nil, nonCompliantResource: NonCompliantResource? = nil, reasonForNonCompliance: String? = nil, reasonForNonComplianceCode: String? = nil, relatedResources: [RelatedResource]? = nil, severity: AuditFindingSeverity? = nil, taskId: String? = nil, taskStartTime: Date? = nil) {
            self.checkName = checkName
            self.findingId = findingId
            self.findingTime = findingTime
            self.isSuppressed = isSuppressed
            self.nonCompliantResource = nonCompliantResource
            self.reasonForNonCompliance = reasonForNonCompliance
            self.reasonForNonComplianceCode = reasonForNonComplianceCode
            self.relatedResources = relatedResources
            self.severity = severity
            self.taskId = taskId
            self.taskStartTime = taskStartTime
        }

        private enum CodingKeys: String, CodingKey {
            case checkName = "checkName"
            case findingId = "findingId"
            case findingTime = "findingTime"
            case isSuppressed = "isSuppressed"
            case nonCompliantResource = "nonCompliantResource"
            case reasonForNonCompliance = "reasonForNonCompliance"
            case reasonForNonComplianceCode = "reasonForNonComplianceCode"
            case relatedResources = "relatedResources"
            case severity = "severity"
            case taskId = "taskId"
            case taskStartTime = "taskStartTime"
        }
    }

    public struct AuditMitigationActionExecutionMetadata: AWSDecodableShape {
        /// The unique identifier for the mitigation action being applied by the task.
        public let actionId: String?
        /// The friendly name of the mitigation action being applied by the task.
        public let actionName: String?
        /// The date and time when the task was completed or canceled. Blank if the task is still running.
        public let endTime: Date?
        /// If an error occurred, the code that indicates which type of error occurred.
        public let errorCode: String?
        /// The unique identifier for the findings to which the task and associated mitigation action are applied.
        public let findingId: String?
        /// If an error occurred, a message that describes the error.
        public let message: String?
        /// The date and time when the task was started.
        public let startTime: Date?
        /// The current status of the task being executed.
        public let status: AuditMitigationActionsExecutionStatus?
        /// The unique identifier for the task that applies the mitigation action.
        public let taskId: String?

        @inlinable
        public init(actionId: String? = nil, actionName: String? = nil, endTime: Date? = nil, errorCode: String? = nil, findingId: String? = nil, message: String? = nil, startTime: Date? = nil, status: AuditMitigationActionsExecutionStatus? = nil, taskId: String? = nil) {
            self.actionId = actionId
            self.actionName = actionName
            self.endTime = endTime
            self.errorCode = errorCode
            self.findingId = findingId
            self.message = message
            self.startTime = startTime
            self.status = status
            self.taskId = taskId
        }

        private enum CodingKeys: String, CodingKey {
            case actionId = "actionId"
            case actionName = "actionName"
            case endTime = "endTime"
            case errorCode = "errorCode"
            case findingId = "findingId"
            case message = "message"
            case startTime = "startTime"
            case status = "status"
            case taskId = "taskId"
        }
    }

    public struct AuditMitigationActionsTaskMetadata: AWSDecodableShape {
        /// The time at which the audit mitigation actions task was started.
        public let startTime: Date?
        /// The unique identifier for the task.
        public let taskId: String?
        /// The current state of the audit mitigation actions task.
        public let taskStatus: AuditMitigationActionsTaskStatus?

        @inlinable
        public init(startTime: Date? = nil, taskId: String? = nil, taskStatus: AuditMitigationActionsTaskStatus? = nil) {
            self.startTime = startTime
            self.taskId = taskId
            self.taskStatus = taskStatus
        }

        private enum CodingKeys: String, CodingKey {
            case startTime = "startTime"
            case taskId = "taskId"
            case taskStatus = "taskStatus"
        }
    }

    public struct AuditMitigationActionsTaskTarget: AWSEncodableShape & AWSDecodableShape {
        /// Specifies a filter in the form of an audit check and set of reason codes that identify the findings from the audit to which the audit mitigation actions task apply.
        public let auditCheckToReasonCodeFilter: [String: [String]]?
        /// If the task will apply a mitigation action to findings from a specific audit, this value uniquely identifies the audit.
        public let auditTaskId: String?
        /// If the task will apply a mitigation action to one or more listed findings, this value uniquely identifies those findings.
        public let findingIds: [String]?

        @inlinable
        public init(auditCheckToReasonCodeFilter: [String: [String]]? = nil, auditTaskId: String? = nil, findingIds: [String]? = nil) {
            self.auditCheckToReasonCodeFilter = auditCheckToReasonCodeFilter
            self.auditTaskId = auditTaskId
            self.findingIds = findingIds
        }

        public func validate(name: String) throws {
            try self.auditCheckToReasonCodeFilter?.forEach {
                try validate($0.value, name: "auditCheckToReasonCodeFilter[\"\($0.key)\"]", parent: name, max: 25)
                try validate($0.value, name: "auditCheckToReasonCodeFilter[\"\($0.key)\"]", parent: name, min: 1)
            }
            try self.validate(self.auditTaskId, name: "auditTaskId", parent: name, max: 40)
            try self.validate(self.auditTaskId, name: "auditTaskId", parent: name, min: 1)
            try self.validate(self.auditTaskId, name: "auditTaskId", parent: name, pattern: "^[a-zA-Z0-9\\-]+$")
            try self.findingIds?.forEach {
                try validate($0, name: "findingIds[]", parent: name, max: 128)
                try validate($0, name: "findingIds[]", parent: name, min: 1)
                try validate($0, name: "findingIds[]", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            }
            try self.validate(self.findingIds, name: "findingIds", parent: name, max: 25)
            try self.validate(self.findingIds, name: "findingIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case auditCheckToReasonCodeFilter = "auditCheckToReasonCodeFilter"
            case auditTaskId = "auditTaskId"
            case findingIds = "findingIds"
        }
    }

    public struct AuditNotificationTarget: AWSEncodableShape & AWSDecodableShape {
        /// True if notifications to the target are enabled.
        public let enabled: Bool?
        /// The ARN of the role that grants permission to send notifications to the target.
        public let roleArn: String?
        /// The ARN of the target (SNS topic) to which audit notifications are sent.
        public let targetArn: String?

        @inlinable
        public init(enabled: Bool? = nil, roleArn: String? = nil, targetArn: String? = nil) {
            self.enabled = enabled
            self.roleArn = roleArn
            self.targetArn = targetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.targetArn, name: "targetArn", parent: name, max: 2048)
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "enabled"
            case roleArn = "roleArn"
            case targetArn = "targetArn"
        }
    }

    public struct AuditSuppression: AWSDecodableShape {
        public let checkName: String
        ///  The description of the audit suppression.
        public let description: String?
        ///  The expiration date (epoch timestamp in seconds) that you want the suppression to adhere to.
        public let expirationDate: Date?
        public let resourceIdentifier: ResourceIdentifier
        ///  Indicates whether a suppression should exist indefinitely or not.
        public let suppressIndefinitely: Bool?

        @inlinable
        public init(checkName: String, description: String? = nil, expirationDate: Date? = nil, resourceIdentifier: ResourceIdentifier, suppressIndefinitely: Bool? = nil) {
            self.checkName = checkName
            self.description = description
            self.expirationDate = expirationDate
            self.resourceIdentifier = resourceIdentifier
            self.suppressIndefinitely = suppressIndefinitely
        }

        private enum CodingKeys: String, CodingKey {
            case checkName = "checkName"
            case description = "description"
            case expirationDate = "expirationDate"
            case resourceIdentifier = "resourceIdentifier"
            case suppressIndefinitely = "suppressIndefinitely"
        }
    }

    public struct AuditTaskMetadata: AWSDecodableShape {
        /// The ID of this audit.
        public let taskId: String?
        /// The status of this audit. One of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED".
        public let taskStatus: AuditTaskStatus?
        /// The type of this audit. One of "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK".
        public let taskType: AuditTaskType?

        @inlinable
        public init(taskId: String? = nil, taskStatus: AuditTaskStatus? = nil, taskType: AuditTaskType? = nil) {
            self.taskId = taskId
            self.taskStatus = taskStatus
            self.taskType = taskType
        }

        private enum CodingKeys: String, CodingKey {
            case taskId = "taskId"
            case taskStatus = "taskStatus"
            case taskType = "taskType"
        }
    }

    public struct AuthInfo: AWSEncodableShape & AWSDecodableShape {
        /// The type of action for which the principal is being authorized.
        public let actionType: ActionType?
        /// The resources for which the principal is being authorized to perform the specified action.
        public let resources: [String]

        @inlinable
        public init(actionType: ActionType? = nil, resources: [String]) {
            self.actionType = actionType
            self.resources = resources
        }

        public func validate(name: String) throws {
            try self.resources.forEach {
                try validate($0, name: "resources[]", parent: name, max: 2048)
                try validate($0, name: "resources[]", parent: name, pattern: "^[\\s\\S]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case actionType = "actionType"
            case resources = "resources"
        }
    }

    public struct AuthResult: AWSDecodableShape {
        /// The policies and statements that allowed the specified action.
        public let allowed: Allowed?
        /// The final authorization decision of this scenario. Multiple statements are taken into account when determining the authorization decision. An explicit deny statement can override multiple allow statements.
        public let authDecision: AuthDecision?
        /// Authorization information.
        public let authInfo: AuthInfo?
        /// The policies and statements that denied the specified action.
        public let denied: Denied?
        /// Contains any missing context values found while evaluating policy.
        public let missingContextValues: [String]?

        @inlinable
        public init(allowed: Allowed? = nil, authDecision: AuthDecision? = nil, authInfo: AuthInfo? = nil, denied: Denied? = nil, missingContextValues: [String]? = nil) {
            self.allowed = allowed
            self.authDecision = authDecision
            self.authInfo = authInfo
            self.denied = denied
            self.missingContextValues = missingContextValues
        }

        private enum CodingKeys: String, CodingKey {
            case allowed = "allowed"
            case authDecision = "authDecision"
            case authInfo = "authInfo"
            case denied = "denied"
            case missingContextValues = "missingContextValues"
        }
    }

    public struct AuthorizerConfig: AWSEncodableShape & AWSDecodableShape {
        /// A Boolean that specifies whether the domain configuration's authorization service can be overridden.
        public let allowAuthorizerOverride: Bool?
        /// The name of the authorization service for a domain configuration.
        public let defaultAuthorizerName: String?

        @inlinable
        public init(allowAuthorizerOverride: Bool? = nil, defaultAuthorizerName: String? = nil) {
            self.allowAuthorizerOverride = allowAuthorizerOverride
            self.defaultAuthorizerName = defaultAuthorizerName
        }

        public func validate(name: String) throws {
            try self.validate(self.defaultAuthorizerName, name: "defaultAuthorizerName", parent: name, max: 128)
            try self.validate(self.defaultAuthorizerName, name: "defaultAuthorizerName", parent: name, min: 1)
            try self.validate(self.defaultAuthorizerName, name: "defaultAuthorizerName", parent: name, pattern: "^[\\w=,@-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case allowAuthorizerOverride = "allowAuthorizerOverride"
            case defaultAuthorizerName = "defaultAuthorizerName"
        }
    }

    public struct AuthorizerDescription: AWSDecodableShape {
        /// The authorizer ARN.
        public let authorizerArn: String?
        /// The authorizer's Lambda function ARN.
        public let authorizerFunctionArn: String?
        /// The authorizer name.
        public let authorizerName: String?
        /// The UNIX timestamp of when the authorizer was created.
        public let creationDate: Date?
        /// When true, the result from the authorizer’s Lambda function is
        /// 	  cached for the time specified in refreshAfterInSeconds. The cached
        /// 	  result is used while the device reuses the same HTTP connection.
        public let enableCachingForHttp: Bool?
        /// The UNIX timestamp of when the authorizer was last updated.
        public let lastModifiedDate: Date?
        /// Specifies whether IoT validates the token signature in an authorization request.
        public let signingDisabled: Bool?
        /// The status of the authorizer.
        public let status: AuthorizerStatus?
        /// The key used to extract the token from the HTTP headers.
        public let tokenKeyName: String?
        /// The public keys used to validate the token signature returned by your custom authentication service.
        public let tokenSigningPublicKeys: [String: String]?

        @inlinable
        public init(authorizerArn: String? = nil, authorizerFunctionArn: String? = nil, authorizerName: String? = nil, creationDate: Date? = nil, enableCachingForHttp: Bool? = nil, lastModifiedDate: Date? = nil, signingDisabled: Bool? = nil, status: AuthorizerStatus? = nil, tokenKeyName: String? = nil, tokenSigningPublicKeys: [String: String]? = nil) {
            self.authorizerArn = authorizerArn
            self.authorizerFunctionArn = authorizerFunctionArn
            self.authorizerName = authorizerName
            self.creationDate = creationDate
            self.enableCachingForHttp = enableCachingForHttp
            self.lastModifiedDate = lastModifiedDate
            self.signingDisabled = signingDisabled
            self.status = status
            self.tokenKeyName = tokenKeyName
            self.tokenSigningPublicKeys = tokenSigningPublicKeys
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerArn = "authorizerArn"
            case authorizerFunctionArn = "authorizerFunctionArn"
            case authorizerName = "authorizerName"
            case creationDate = "creationDate"
            case enableCachingForHttp = "enableCachingForHttp"
            case lastModifiedDate = "lastModifiedDate"
            case signingDisabled = "signingDisabled"
            case status = "status"
            case tokenKeyName = "tokenKeyName"
            case tokenSigningPublicKeys = "tokenSigningPublicKeys"
        }
    }

    public struct AuthorizerSummary: AWSDecodableShape {
        /// The authorizer ARN.
        public let authorizerArn: String?
        /// The authorizer name.
        public let authorizerName: String?

        @inlinable
        public init(authorizerArn: String? = nil, authorizerName: String? = nil) {
            self.authorizerArn = authorizerArn
            self.authorizerName = authorizerName
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerArn = "authorizerArn"
            case authorizerName = "authorizerName"
        }
    }

    public struct AwsJobAbortConfig: AWSEncodableShape {
        /// The list of criteria that determine when and how to abort the job.
        public let abortCriteriaList: [AwsJobAbortCriteria]

        @inlinable
        public init(abortCriteriaList: [AwsJobAbortCriteria]) {
            self.abortCriteriaList = abortCriteriaList
        }

        public func validate(name: String) throws {
            try self.abortCriteriaList.forEach {
                try $0.validate(name: "\(name).abortCriteriaList[]")
            }
            try self.validate(self.abortCriteriaList, name: "abortCriteriaList", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case abortCriteriaList = "abortCriteriaList"
        }
    }

    public struct AwsJobAbortCriteria: AWSEncodableShape {
        /// The type of job action to take to initiate the job abort.
        public let action: AwsJobAbortCriteriaAbortAction
        /// The type of job execution failures that can initiate a job abort.
        public let failureType: AwsJobAbortCriteriaFailureType
        /// The minimum number of things which must receive job execution notifications before the job  can be aborted.
        public let minNumberOfExecutedThings: Int
        /// The minimum percentage of job execution failures that must occur to initiate the job abort. Amazon Web Services IoT Core supports up to two digits after the decimal (for example, 10.9 and 10.99, but not 10.999).
        public let thresholdPercentage: Double

        @inlinable
        public init(action: AwsJobAbortCriteriaAbortAction, failureType: AwsJobAbortCriteriaFailureType, minNumberOfExecutedThings: Int, thresholdPercentage: Double) {
            self.action = action
            self.failureType = failureType
            self.minNumberOfExecutedThings = minNumberOfExecutedThings
            self.thresholdPercentage = thresholdPercentage
        }

        public func validate(name: String) throws {
            try self.validate(self.minNumberOfExecutedThings, name: "minNumberOfExecutedThings", parent: name, min: 1)
            try self.validate(self.thresholdPercentage, name: "thresholdPercentage", parent: name, max: 100.0)
        }

        private enum CodingKeys: String, CodingKey {
            case action = "action"
            case failureType = "failureType"
            case minNumberOfExecutedThings = "minNumberOfExecutedThings"
            case thresholdPercentage = "thresholdPercentage"
        }
    }

    public struct AwsJobExecutionsRolloutConfig: AWSEncodableShape & AWSDecodableShape {
        /// The rate of increase for a job rollout. This parameter allows you to define an exponential rate  increase for a job rollout.
        public let exponentialRate: AwsJobExponentialRolloutRate?
        /// The maximum number of OTA update job executions started per minute.
        public let maximumPerMinute: Int?

        @inlinable
        public init(exponentialRate: AwsJobExponentialRolloutRate? = nil, maximumPerMinute: Int? = nil) {
            self.exponentialRate = exponentialRate
            self.maximumPerMinute = maximumPerMinute
        }

        public func validate(name: String) throws {
            try self.exponentialRate?.validate(name: "\(name).exponentialRate")
            try self.validate(self.maximumPerMinute, name: "maximumPerMinute", parent: name, max: 1000)
            try self.validate(self.maximumPerMinute, name: "maximumPerMinute", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case exponentialRate = "exponentialRate"
            case maximumPerMinute = "maximumPerMinute"
        }
    }

    public struct AwsJobExponentialRolloutRate: AWSEncodableShape & AWSDecodableShape {
        /// The minimum number of things that will be notified of a pending job, per minute, at the start  of the job rollout. This is the initial rate of the rollout.
        public let baseRatePerMinute: Int
        /// The rate of increase for a job rollout. The number of things notified is multiplied by this  factor.
        public let incrementFactor: Double
        /// The criteria to initiate the increase in rate of rollout for a job. Amazon Web Services IoT Core supports up to one digit after the decimal (for example, 1.5, but not 1.55).
        public let rateIncreaseCriteria: AwsJobRateIncreaseCriteria

        @inlinable
        public init(baseRatePerMinute: Int, incrementFactor: Double, rateIncreaseCriteria: AwsJobRateIncreaseCriteria) {
            self.baseRatePerMinute = baseRatePerMinute
            self.incrementFactor = incrementFactor
            self.rateIncreaseCriteria = rateIncreaseCriteria
        }

        public func validate(name: String) throws {
            try self.validate(self.baseRatePerMinute, name: "baseRatePerMinute", parent: name, max: 1000)
            try self.validate(self.baseRatePerMinute, name: "baseRatePerMinute", parent: name, min: 1)
            try self.rateIncreaseCriteria.validate(name: "\(name).rateIncreaseCriteria")
        }

        private enum CodingKeys: String, CodingKey {
            case baseRatePerMinute = "baseRatePerMinute"
            case incrementFactor = "incrementFactor"
            case rateIncreaseCriteria = "rateIncreaseCriteria"
        }
    }

    public struct AwsJobPresignedUrlConfig: AWSEncodableShape & AWSDecodableShape {
        /// How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 1800 seconds. Pre-signed URLs are generated when a request for the job document is received.
        public let expiresInSec: Int64?

        @inlinable
        public init(expiresInSec: Int64? = nil) {
            self.expiresInSec = expiresInSec
        }

        private enum CodingKeys: String, CodingKey {
            case expiresInSec = "expiresInSec"
        }
    }

    public struct AwsJobRateIncreaseCriteria: AWSEncodableShape & AWSDecodableShape {
        /// When this number of things have been notified, it will initiate an increase in the rollout rate.
        public let numberOfNotifiedThings: Int?
        /// When this number of things have succeeded in their job execution, it will initiate an  increase in the rollout rate.
        public let numberOfSucceededThings: Int?

        @inlinable
        public init(numberOfNotifiedThings: Int? = nil, numberOfSucceededThings: Int? = nil) {
            self.numberOfNotifiedThings = numberOfNotifiedThings
            self.numberOfSucceededThings = numberOfSucceededThings
        }

        public func validate(name: String) throws {
            try self.validate(self.numberOfNotifiedThings, name: "numberOfNotifiedThings", parent: name, min: 1)
            try self.validate(self.numberOfSucceededThings, name: "numberOfSucceededThings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case numberOfNotifiedThings = "numberOfNotifiedThings"
            case numberOfSucceededThings = "numberOfSucceededThings"
        }
    }

    public struct AwsJobTimeoutConfig: AWSEncodableShape {
        /// Specifies the amount of time, in minutes, this device has to finish execution of this job. The  timeout interval can be anywhere between 1 minute and 7 days (1 to 10080 minutes). The in progress  timer can't be updated and will apply to all job executions for the job. Whenever a job execution  remains in the IN_PROGRESS status for longer than this interval, the job execution will fail and  switch to the terminal TIMED_OUT status.
        public let inProgressTimeoutInMinutes: Int64?

        @inlinable
        public init(inProgressTimeoutInMinutes: Int64? = nil) {
            self.inProgressTimeoutInMinutes = inProgressTimeoutInMinutes
        }

        private enum CodingKeys: String, CodingKey {
            case inProgressTimeoutInMinutes = "inProgressTimeoutInMinutes"
        }
    }

    public struct Behavior: AWSEncodableShape & AWSDecodableShape {
        /// The criteria that determine if a device is behaving normally in regard to the metric.  In the IoT console, you can choose to be sent an alert through Amazon SNS when IoT Device Defender detects that a device is behaving anomalously.
        public let criteria: BehaviorCriteria?
        /// Value indicates exporting metrics related to the behavior when it is true.
        public let exportMetric: Bool?
        /// What is measured by the behavior.
        public let metric: String?
        /// The dimension for a metric in your behavior. For example, using a TOPIC_FILTER dimension, you can narrow down the scope of the metric to only MQTT topics where the name matches the pattern specified in the dimension. This can't be used with custom metrics.
        public let metricDimension: MetricDimension?
        /// The name you've given to the behavior.
        public let name: String
        ///  Suppresses alerts.
        public let suppressAlerts: Bool?

        @inlinable
        public init(criteria: BehaviorCriteria? = nil, exportMetric: Bool? = nil, metric: String? = nil, metricDimension: MetricDimension? = nil, name: String, suppressAlerts: Bool? = nil) {
            self.criteria = criteria
            self.exportMetric = exportMetric
            self.metric = metric
            self.metricDimension = metricDimension
            self.name = name
            self.suppressAlerts = suppressAlerts
        }

        public func validate(name: String) throws {
            try self.criteria?.validate(name: "\(name).criteria")
            try self.metricDimension?.validate(name: "\(name).metricDimension")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case criteria = "criteria"
            case exportMetric = "exportMetric"
            case metric = "metric"
            case metricDimension = "metricDimension"
            case name = "name"
            case suppressAlerts = "suppressAlerts"
        }
    }

    public struct BehaviorCriteria: AWSEncodableShape & AWSDecodableShape {
        /// The operator that relates the thing measured (metric) to the criteria  (containing a value or statisticalThreshold). Valid operators include:    string-list: in-set and not-in-set     number-list: in-set and not-in-set     ip-address-list: in-cidr-set and not-in-cidr-set     number: less-than, less-than-equals, greater-than, and greater-than-equals
        public let comparisonOperator: ComparisonOperator?
        /// If a device is in violation of the behavior for the specified number of consecutive  datapoints, an alarm occurs. If not specified, the default is 1.
        public let consecutiveDatapointsToAlarm: Int?
        /// If an alarm has occurred and the offending device is no longer in violation of the behavior  for the specified number of consecutive datapoints, the alarm is cleared. If not specified, the default is 1.
        public let consecutiveDatapointsToClear: Int?
        /// Use this to specify the time duration over which the behavior is evaluated, for those criteria that have a time dimension (for example, NUM_MESSAGES_SENT). For a statisticalThreshhold metric comparison, measurements from all devices are accumulated over this time duration before being used to calculate percentiles, and later, measurements from an individual device are also accumulated over this time duration before being given a percentile rank. Cannot be used with list-based metric datatypes.
        public let durationSeconds: Int?
        ///  The configuration of an ML Detect
        public let mlDetectionConfig: MachineLearningDetectionConfig?
        /// A statistical ranking (percentile)that indicates a threshold value by which a behavior is determined to be in compliance or in violation of the behavior.
        public let statisticalThreshold: StatisticalThreshold?
        /// The value to be compared with the metric.
        public let value: MetricValue?

        @inlinable
        public init(comparisonOperator: ComparisonOperator? = nil, consecutiveDatapointsToAlarm: Int? = nil, consecutiveDatapointsToClear: Int? = nil, durationSeconds: Int? = nil, mlDetectionConfig: MachineLearningDetectionConfig? = nil, statisticalThreshold: StatisticalThreshold? = nil, value: MetricValue? = nil) {
            self.comparisonOperator = comparisonOperator
            self.consecutiveDatapointsToAlarm = consecutiveDatapointsToAlarm
            self.consecutiveDatapointsToClear = consecutiveDatapointsToClear
            self.durationSeconds = durationSeconds
            self.mlDetectionConfig = mlDetectionConfig
            self.statisticalThreshold = statisticalThreshold
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.consecutiveDatapointsToAlarm, name: "consecutiveDatapointsToAlarm", parent: name, max: 10)
            try self.validate(self.consecutiveDatapointsToAlarm, name: "consecutiveDatapointsToAlarm", parent: name, min: 1)
            try self.validate(self.consecutiveDatapointsToClear, name: "consecutiveDatapointsToClear", parent: name, max: 10)
            try self.validate(self.consecutiveDatapointsToClear, name: "consecutiveDatapointsToClear", parent: name, min: 1)
            try self.statisticalThreshold?.validate(name: "\(name).statisticalThreshold")
            try self.value?.validate(name: "\(name).value")
        }

        private enum CodingKeys: String, CodingKey {
            case comparisonOperator = "comparisonOperator"
            case consecutiveDatapointsToAlarm = "consecutiveDatapointsToAlarm"
            case consecutiveDatapointsToClear = "consecutiveDatapointsToClear"
            case durationSeconds = "durationSeconds"
            case mlDetectionConfig = "mlDetectionConfig"
            case statisticalThreshold = "statisticalThreshold"
            case value = "value"
        }
    }

    public struct BehaviorModelTrainingSummary: AWSDecodableShape {
        ///  The name of the behavior.
        public let behaviorName: String?
        ///  The percentage of datapoints collected.
        public let datapointsCollectionPercentage: Double?
        ///  The date the model was last refreshed.
        public let lastModelRefreshDate: Date?
        ///  The status of the behavior model.
        public let modelStatus: ModelStatus?
        ///  The name of the security profile.
        public let securityProfileName: String?
        ///  The date a training model started collecting data.
        public let trainingDataCollectionStartDate: Date?

        @inlinable
        public init(behaviorName: String? = nil, datapointsCollectionPercentage: Double? = nil, lastModelRefreshDate: Date? = nil, modelStatus: ModelStatus? = nil, securityProfileName: String? = nil, trainingDataCollectionStartDate: Date? = nil) {
            self.behaviorName = behaviorName
            self.datapointsCollectionPercentage = datapointsCollectionPercentage
            self.lastModelRefreshDate = lastModelRefreshDate
            self.modelStatus = modelStatus
            self.securityProfileName = securityProfileName
            self.trainingDataCollectionStartDate = trainingDataCollectionStartDate
        }

        private enum CodingKeys: String, CodingKey {
            case behaviorName = "behaviorName"
            case datapointsCollectionPercentage = "datapointsCollectionPercentage"
            case lastModelRefreshDate = "lastModelRefreshDate"
            case modelStatus = "modelStatus"
            case securityProfileName = "securityProfileName"
            case trainingDataCollectionStartDate = "trainingDataCollectionStartDate"
        }
    }

    public struct BillingGroupMetadata: AWSDecodableShape {
        /// The date the billing group was created.
        public let creationDate: Date?

        @inlinable
        public init(creationDate: Date? = nil) {
            self.creationDate = creationDate
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
        }
    }

    public struct BillingGroupProperties: AWSEncodableShape & AWSDecodableShape {
        /// The description of the billing group.
        public let billingGroupDescription: String?

        @inlinable
        public init(billingGroupDescription: String? = nil) {
            self.billingGroupDescription = billingGroupDescription
        }

        public func validate(name: String) throws {
            try self.validate(self.billingGroupDescription, name: "billingGroupDescription", parent: name, max: 2028)
            try self.validate(self.billingGroupDescription, name: "billingGroupDescription", parent: name, pattern: "^[\\p{Graph}\\x20]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case billingGroupDescription = "billingGroupDescription"
        }
    }

    public struct Bucket: AWSDecodableShape {
        /// The number of documents that have the value counted for the particular bucket.
        public let count: Int?
        /// The value counted for the particular bucket.
        public let keyValue: String?

        @inlinable
        public init(count: Int? = nil, keyValue: String? = nil) {
            self.count = count
            self.keyValue = keyValue
        }

        private enum CodingKeys: String, CodingKey {
            case count = "count"
            case keyValue = "keyValue"
        }
    }

    public struct BucketsAggregationType: AWSEncodableShape {
        /// Performs an aggregation that will return a list of buckets. The list of buckets is a ranked list of the number of occurrences of an aggregation field value.
        public let termsAggregation: TermsAggregation?

        @inlinable
        public init(termsAggregation: TermsAggregation? = nil) {
            self.termsAggregation = termsAggregation
        }

        public func validate(name: String) throws {
            try self.termsAggregation?.validate(name: "\(name).termsAggregation")
        }

        private enum CodingKeys: String, CodingKey {
            case termsAggregation = "termsAggregation"
        }
    }

    public struct CACertificate: AWSDecodableShape {
        /// The ARN of the CA certificate.
        public let certificateArn: String?
        /// The ID of the CA certificate.
        public let certificateId: String?
        /// The date the CA certificate was created.
        public let creationDate: Date?
        /// The status of the CA certificate. The status value REGISTER_INACTIVE is deprecated and should not be used.
        public let status: CACertificateStatus?

        @inlinable
        public init(certificateArn: String? = nil, certificateId: String? = nil, creationDate: Date? = nil, status: CACertificateStatus? = nil) {
            self.certificateArn = certificateArn
            self.certificateId = certificateId
            self.creationDate = creationDate
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn = "certificateArn"
            case certificateId = "certificateId"
            case creationDate = "creationDate"
            case status = "status"
        }
    }

    public struct CACertificateDescription: AWSDecodableShape {
        /// Whether the CA certificate configured for auto registration of device certificates. Valid values are "ENABLE" and "DISABLE"
        public let autoRegistrationStatus: AutoRegistrationStatus?
        /// The CA certificate ARN.
        public let certificateArn: String?
        /// The CA certificate ID.
        public let certificateId: String?
        /// The mode of the CA.  All the device certificates that are registered using this CA will be registered  in the same mode as the CA. For more information about certificate mode for device certificates, see certificate mode.
        public let certificateMode: CertificateMode?
        /// The CA certificate data, in PEM format.
        public let certificatePem: String?
        /// The date the CA certificate was created.
        public let creationDate: Date?
        /// The customer version of the CA certificate.
        public let customerVersion: Int?
        /// The generation ID of the CA certificate.
        public let generationId: String?
        /// The date the CA certificate was last modified.
        public let lastModifiedDate: Date?
        /// The owner of the CA certificate.
        public let ownedBy: String?
        /// The status of a CA certificate.
        public let status: CACertificateStatus?
        /// When the CA certificate is valid.
        public let validity: CertificateValidity?

        @inlinable
        public init(autoRegistrationStatus: AutoRegistrationStatus? = nil, certificateArn: String? = nil, certificateId: String? = nil, certificateMode: CertificateMode? = nil, certificatePem: String? = nil, creationDate: Date? = nil, customerVersion: Int? = nil, generationId: String? = nil, lastModifiedDate: Date? = nil, ownedBy: String? = nil, status: CACertificateStatus? = nil, validity: CertificateValidity? = nil) {
            self.autoRegistrationStatus = autoRegistrationStatus
            self.certificateArn = certificateArn
            self.certificateId = certificateId
            self.certificateMode = certificateMode
            self.certificatePem = certificatePem
            self.creationDate = creationDate
            self.customerVersion = customerVersion
            self.generationId = generationId
            self.lastModifiedDate = lastModifiedDate
            self.ownedBy = ownedBy
            self.status = status
            self.validity = validity
        }

        private enum CodingKeys: String, CodingKey {
            case autoRegistrationStatus = "autoRegistrationStatus"
            case certificateArn = "certificateArn"
            case certificateId = "certificateId"
            case certificateMode = "certificateMode"
            case certificatePem = "certificatePem"
            case creationDate = "creationDate"
            case customerVersion = "customerVersion"
            case generationId = "generationId"
            case lastModifiedDate = "lastModifiedDate"
            case ownedBy = "ownedBy"
            case status = "status"
            case validity = "validity"
        }
    }

    public struct CancelAuditMitigationActionsTaskRequest: AWSEncodableShape {
        /// The unique identifier for the task that you want to cancel.
        public let taskId: String

        @inlinable
        public init(taskId: String) {
            self.taskId = taskId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.taskId, key: "taskId")
        }

        public func validate(name: String) throws {
            try self.validate(self.taskId, name: "taskId", parent: name, max: 128)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct CancelAuditMitigationActionsTaskResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CancelAuditTaskRequest: AWSEncodableShape {
        /// The ID of the audit you want to cancel. You can only cancel an audit that is "IN_PROGRESS".
        public let taskId: String

        @inlinable
        public init(taskId: String) {
            self.taskId = taskId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.taskId, key: "taskId")
        }

        public func validate(name: String) throws {
            try self.validate(self.taskId, name: "taskId", parent: name, max: 40)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "^[a-zA-Z0-9\\-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct CancelAuditTaskResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CancelCertificateTransferRequest: AWSEncodableShape {
        /// The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String

        @inlinable
        public init(certificateId: String) {
            self.certificateId = certificateId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.certificateId, key: "certificateId")
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "^(0x)?[a-fA-F0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct CancelDetectMitigationActionsTaskRequest: AWSEncodableShape {
        ///  The unique identifier of the task.
        public let taskId: String

        @inlinable
        public init(taskId: String) {
            self.taskId = taskId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.taskId, key: "taskId")
        }

        public func validate(name: String) throws {
            try self.validate(self.taskId, name: "taskId", parent: name, max: 128)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct CancelDetectMitigationActionsTaskResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CancelJobExecutionRequest: AWSEncodableShape {
        /// (Optional) The expected current version of the job execution. Each time you update the job execution, its version is incremented. If the version of the job execution stored in Jobs does not match, the update is rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job execution status data.)
        public let expectedVersion: Int64?
        /// (Optional) If true the job execution will be canceled if it has status IN_PROGRESS or QUEUED, otherwise the job execution will be canceled only if it has status QUEUED. If you attempt to cancel a job execution that is IN_PROGRESS, and you do not set force to true, then an InvalidStateTransitionException will be thrown. The default is false. Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job execution status. Use caution and ensure that the device is able to recover to a valid state.
        public let force: Bool?
        /// The ID of the job to be canceled.
        public let jobId: String
        /// A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged. You can specify at most 10 name/value pairs.
        public let statusDetails: [String: String]?
        /// The name of the thing whose execution of the job will be canceled.
        public let thingName: String

        @inlinable
        public init(expectedVersion: Int64? = nil, force: Bool? = nil, jobId: String, statusDetails: [String: String]? = nil, thingName: String) {
            self.expectedVersion = expectedVersion
            self.force = force
            self.jobId = jobId
            self.statusDetails = statusDetails
            self.thingName = thingName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.expectedVersion, forKey: .expectedVersion)
            request.encodeQuery(self.force, key: "force")
            request.encodePath(self.jobId, key: "jobId")
            try container.encodeIfPresent(self.statusDetails, forKey: .statusDetails)
            request.encodePath(self.thingName, key: "thingName")
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.statusDetails?.forEach {
                try validate($0.key, name: "statusDetails.key", parent: name, max: 128)
                try validate($0.key, name: "statusDetails.key", parent: name, min: 1)
                try validate($0.key, name: "statusDetails.key", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
                try validate($0.value, name: "statusDetails[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "statusDetails[\"\($0.key)\"]", parent: name, pattern: "^[^\\p{C}]+$")
            }
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case expectedVersion = "expectedVersion"
            case statusDetails = "statusDetails"
        }
    }

    public struct CancelJobRequest: AWSEncodableShape {
        /// An optional comment string describing why the job was canceled.
        public let comment: String?
        /// (Optional) If true job executions with status "IN_PROGRESS" and "QUEUED" are canceled, otherwise only job executions with status "QUEUED" are canceled. The default is false. Canceling a job which is "IN_PROGRESS", will cause a device which is executing the job to be unable to update the job execution status. Use caution and ensure that each device executing a job which is canceled is able to recover to a valid state.
        public let force: Bool?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String
        /// (Optional)A reason code string that explains why the job was canceled.
        public let reasonCode: String?

        @inlinable
        public init(comment: String? = nil, force: Bool? = nil, jobId: String, reasonCode: String? = nil) {
            self.comment = comment
            self.force = force
            self.jobId = jobId
            self.reasonCode = reasonCode
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.comment, forKey: .comment)
            request.encodeQuery(self.force, key: "force")
            request.encodePath(self.jobId, key: "jobId")
            try container.encodeIfPresent(self.reasonCode, forKey: .reasonCode)
        }

        public func validate(name: String) throws {
            try self.validate(self.comment, name: "comment", parent: name, max: 2028)
            try self.validate(self.comment, name: "comment", parent: name, pattern: "^[^\\p{C}]+$")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.reasonCode, name: "reasonCode", parent: name, max: 128)
            try self.validate(self.reasonCode, name: "reasonCode", parent: name, pattern: "^[\\p{Upper}\\p{Digit}_]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case comment = "comment"
            case reasonCode = "reasonCode"
        }
    }

    public struct CancelJobResponse: AWSDecodableShape {
        /// A short text description of the job.
        public let description: String?
        /// The job ARN.
        public let jobArn: String?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String?

        @inlinable
        public init(description: String? = nil, jobArn: String? = nil, jobId: String? = nil) {
            self.description = description
            self.jobArn = jobArn
            self.jobId = jobId
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case jobArn = "jobArn"
            case jobId = "jobId"
        }
    }

    public struct Certificate: AWSDecodableShape {
        /// The ARN of the certificate.
        public let certificateArn: String?
        /// The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String?
        /// The mode of the certificate.  DEFAULT: A certificate in DEFAULT mode is either generated by Amazon Web Services IoT Core or registered with an issuer certificate authority (CA) in DEFAULT mode. Devices with certificates in DEFAULT mode aren't required to send the Server Name Indication (SNI) extension when connecting to Amazon Web Services IoT Core. However, to use features such as custom domains and VPC endpoints, we recommend that you use the SNI extension when connecting to Amazon Web Services IoT Core.  SNI_ONLY: A certificate in SNI_ONLY mode is registered without an issuer CA. Devices with certificates  in SNI_ONLY mode must send the SNI extension when connecting to Amazon Web Services IoT Core.
        public let certificateMode: CertificateMode?
        /// The date and time the certificate was created.
        public let creationDate: Date?
        /// The status of the certificate. The status value REGISTER_INACTIVE is deprecated and should not be used.
        public let status: CertificateStatus?

        @inlinable
        public init(certificateArn: String? = nil, certificateId: String? = nil, certificateMode: CertificateMode? = nil, creationDate: Date? = nil, status: CertificateStatus? = nil) {
            self.certificateArn = certificateArn
            self.certificateId = certificateId
            self.certificateMode = certificateMode
            self.creationDate = creationDate
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn = "certificateArn"
            case certificateId = "certificateId"
            case certificateMode = "certificateMode"
            case creationDate = "creationDate"
            case status = "status"
        }
    }

    public struct CertificateDescription: AWSDecodableShape {
        /// The certificate ID of the CA certificate used to sign this certificate.
        public let caCertificateId: String?
        /// The ARN of the certificate.
        public let certificateArn: String?
        /// The ID of the certificate.
        public let certificateId: String?
        /// The mode of the certificate.  DEFAULT: A certificate in DEFAULT mode is either generated by Amazon Web Services IoT Core or registered with an issuer certificate authority (CA) in DEFAULT mode. Devices with certificates in DEFAULT mode aren't required to send the Server Name Indication (SNI) extension when connecting to Amazon Web Services IoT Core. However, to use features such as custom domains and VPC endpoints, we recommend that you use the SNI extension when connecting to Amazon Web Services IoT Core.  SNI_ONLY: A certificate in SNI_ONLY mode is registered without an issuer CA. Devices with certificates  in SNI_ONLY mode must send the SNI extension when connecting to Amazon Web Services IoT Core.  For more information about the value for SNI extension, see Transport security in IoT.
        public let certificateMode: CertificateMode?
        /// The certificate data, in PEM format.
        public let certificatePem: String?
        /// The date and time the certificate was created.
        public let creationDate: Date?
        /// The customer version of the certificate.
        public let customerVersion: Int?
        /// The generation ID of the certificate.
        public let generationId: String?
        /// The date and time the certificate was last modified.
        public let lastModifiedDate: Date?
        /// The ID of the Amazon Web Services account that owns the certificate.
        public let ownedBy: String?
        /// The ID of the Amazon Web Services account of the previous owner of the certificate.
        public let previousOwnedBy: String?
        /// The status of the certificate.
        public let status: CertificateStatus?
        /// The transfer data.
        public let transferData: TransferData?
        /// When the certificate is valid.
        public let validity: CertificateValidity?

        @inlinable
        public init(caCertificateId: String? = nil, certificateArn: String? = nil, certificateId: String? = nil, certificateMode: CertificateMode? = nil, certificatePem: String? = nil, creationDate: Date? = nil, customerVersion: Int? = nil, generationId: String? = nil, lastModifiedDate: Date? = nil, ownedBy: String? = nil, previousOwnedBy: String? = nil, status: CertificateStatus? = nil, transferData: TransferData? = nil, validity: CertificateValidity? = nil) {
            self.caCertificateId = caCertificateId
            self.certificateArn = certificateArn
            self.certificateId = certificateId
            self.certificateMode = certificateMode
            self.certificatePem = certificatePem
            self.creationDate = creationDate
            self.customerVersion = customerVersion
            self.generationId = generationId
            self.lastModifiedDate = lastModifiedDate
            self.ownedBy = ownedBy
            self.previousOwnedBy = previousOwnedBy
            self.status = status
            self.transferData = transferData
            self.validity = validity
        }

        private enum CodingKeys: String, CodingKey {
            case caCertificateId = "caCertificateId"
            case certificateArn = "certificateArn"
            case certificateId = "certificateId"
            case certificateMode = "certificateMode"
            case certificatePem = "certificatePem"
            case creationDate = "creationDate"
            case customerVersion = "customerVersion"
            case generationId = "generationId"
            case lastModifiedDate = "lastModifiedDate"
            case ownedBy = "ownedBy"
            case previousOwnedBy = "previousOwnedBy"
            case status = "status"
            case transferData = "transferData"
            case validity = "validity"
        }
    }

    public struct CertificateProviderSummary: AWSDecodableShape {
        /// The ARN of the certificate provider.
        public let certificateProviderArn: String?
        /// The name of the certificate provider.
        public let certificateProviderName: String?

        @inlinable
        public init(certificateProviderArn: String? = nil, certificateProviderName: String? = nil) {
            self.certificateProviderArn = certificateProviderArn
            self.certificateProviderName = certificateProviderName
        }

        private enum CodingKeys: String, CodingKey {
            case certificateProviderArn = "certificateProviderArn"
            case certificateProviderName = "certificateProviderName"
        }
    }

    public struct CertificateValidity: AWSDecodableShape {
        /// The certificate is not valid after this date.
        public let notAfter: Date?
        /// The certificate is not valid before this date.
        public let notBefore: Date?

        @inlinable
        public init(notAfter: Date? = nil, notBefore: Date? = nil) {
            self.notAfter = notAfter
            self.notBefore = notBefore
        }

        private enum CodingKeys: String, CodingKey {
            case notAfter = "notAfter"
            case notBefore = "notBefore"
        }
    }

    public struct ClearDefaultAuthorizerRequest: AWSEncodableShape {
        public init() {}
    }

    public struct ClearDefaultAuthorizerResponse: AWSDecodableShape {
        public init() {}
    }

    public struct ClientCertificateConfig: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the Lambda function that IoT invokes after mutual TLS authentication during the connection.
        public let clientCertificateCallbackArn: String?

        @inlinable
        public init(clientCertificateCallbackArn: String? = nil) {
            self.clientCertificateCallbackArn = clientCertificateCallbackArn
        }

        public func validate(name: String) throws {
            try self.validate(self.clientCertificateCallbackArn, name: "clientCertificateCallbackArn", parent: name, max: 2048)
            try self.validate(self.clientCertificateCallbackArn, name: "clientCertificateCallbackArn", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientCertificateCallbackArn = "clientCertificateCallbackArn"
        }
    }

    public struct CloudwatchAlarmAction: AWSEncodableShape & AWSDecodableShape {
        /// The CloudWatch alarm name.
        public let alarmName: String
        /// The IAM role that allows access to the CloudWatch alarm.
        public let roleArn: String
        /// The reason for the alarm change.
        public let stateReason: String
        /// The value of the alarm state. Acceptable values are: OK, ALARM, INSUFFICIENT_DATA.
        public let stateValue: String

        @inlinable
        public init(alarmName: String, roleArn: String, stateReason: String, stateValue: String) {
            self.alarmName = alarmName
            self.roleArn = roleArn
            self.stateReason = stateReason
            self.stateValue = stateValue
        }

        private enum CodingKeys: String, CodingKey {
            case alarmName = "alarmName"
            case roleArn = "roleArn"
            case stateReason = "stateReason"
            case stateValue = "stateValue"
        }
    }

    public struct CloudwatchLogsAction: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether batches of log records will be extracted and uploaded into CloudWatch. Values include true or false (default).
        public let batchMode: Bool?
        /// The CloudWatch log group to which the action sends data.
        public let logGroupName: String
        /// The IAM role that allows access to the CloudWatch log.
        public let roleArn: String

        @inlinable
        public init(batchMode: Bool? = nil, logGroupName: String, roleArn: String) {
            self.batchMode = batchMode
            self.logGroupName = logGroupName
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case batchMode = "batchMode"
            case logGroupName = "logGroupName"
            case roleArn = "roleArn"
        }
    }

    public struct CloudwatchMetricAction: AWSEncodableShape & AWSDecodableShape {
        /// The CloudWatch metric name.
        public let metricName: String
        /// The CloudWatch metric namespace name.
        public let metricNamespace: String
        /// An optional Unix timestamp.
        public let metricTimestamp: String?
        /// The metric unit supported by CloudWatch.
        public let metricUnit: String
        /// The CloudWatch metric value.
        public let metricValue: String
        /// The IAM role that allows access to the CloudWatch metric.
        public let roleArn: String

        @inlinable
        public init(metricName: String, metricNamespace: String, metricTimestamp: String? = nil, metricUnit: String, metricValue: String, roleArn: String) {
            self.metricName = metricName
            self.metricNamespace = metricNamespace
            self.metricTimestamp = metricTimestamp
            self.metricUnit = metricUnit
            self.metricValue = metricValue
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case metricName = "metricName"
            case metricNamespace = "metricNamespace"
            case metricTimestamp = "metricTimestamp"
            case metricUnit = "metricUnit"
            case metricValue = "metricValue"
            case roleArn = "roleArn"
        }
    }

    public struct CodeSigning: AWSEncodableShape & AWSDecodableShape {
        /// The ID of the AWSSignerJob which was created to sign the file.
        public let awsSignerJobId: String?
        /// A custom method for code signing a file.
        public let customCodeSigning: CustomCodeSigning?
        /// Describes the code-signing job.
        public let startSigningJobParameter: StartSigningJobParameter?

        @inlinable
        public init(awsSignerJobId: String? = nil, customCodeSigning: CustomCodeSigning? = nil, startSigningJobParameter: StartSigningJobParameter? = nil) {
            self.awsSignerJobId = awsSignerJobId
            self.customCodeSigning = customCodeSigning
            self.startSigningJobParameter = startSigningJobParameter
        }

        public func validate(name: String) throws {
            try self.startSigningJobParameter?.validate(name: "\(name).startSigningJobParameter")
        }

        private enum CodingKeys: String, CodingKey {
            case awsSignerJobId = "awsSignerJobId"
            case customCodeSigning = "customCodeSigning"
            case startSigningJobParameter = "startSigningJobParameter"
        }
    }

    public struct CodeSigningCertificateChain: AWSEncodableShape & AWSDecodableShape {
        /// The name of the certificate.
        public let certificateName: String?
        /// A base64 encoded binary representation of the code signing certificate chain.
        public let inlineDocument: String?

        @inlinable
        public init(certificateName: String? = nil, inlineDocument: String? = nil) {
            self.certificateName = certificateName
            self.inlineDocument = inlineDocument
        }

        private enum CodingKeys: String, CodingKey {
            case certificateName = "certificateName"
            case inlineDocument = "inlineDocument"
        }
    }

    public struct CodeSigningSignature: AWSEncodableShape & AWSDecodableShape {
        /// A base64 encoded binary representation of the code signing signature.
        public let inlineDocument: AWSBase64Data?

        @inlinable
        public init(inlineDocument: AWSBase64Data? = nil) {
            self.inlineDocument = inlineDocument
        }

        private enum CodingKeys: String, CodingKey {
            case inlineDocument = "inlineDocument"
        }
    }

    public struct CommandExecutionResult: AWSDecodableShape {
        /// An attribute of type Boolean. For example:  "BOOL": true
        public let b: Bool?
        /// An attribute of type Binary.
        public let bin: AWSBase64Data?
        /// An attribute of type String. For example:  "S": "Hello"
        public let s: String?

        @inlinable
        public init(b: Bool? = nil, bin: AWSBase64Data? = nil, s: String? = nil) {
            self.b = b
            self.bin = bin
            self.s = s
        }

        private enum CodingKeys: String, CodingKey {
            case b = "B"
            case bin = "BIN"
            case s = "S"
        }
    }

    public struct CommandExecutionSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the command execution.
        public let commandArn: String?
        /// The date and time at which the command completed executing on the target device.
        public let completedAt: Date?
        /// The date and time at which the command execution was created for the target device.
        public let createdAt: Date?
        /// The unique identifier of the command execution.
        public let executionId: String?
        /// The date and time at which the command started executing on the target device.
        public let startedAt: Date?
        /// The status of the command executions.
        public let status: CommandExecutionStatus?
        /// The Amazon Resource Name (ARN) of the target device for which the command is being executed.
        public let targetArn: String?

        @inlinable
        public init(commandArn: String? = nil, completedAt: Date? = nil, createdAt: Date? = nil, executionId: String? = nil, startedAt: Date? = nil, status: CommandExecutionStatus? = nil, targetArn: String? = nil) {
            self.commandArn = commandArn
            self.completedAt = completedAt
            self.createdAt = createdAt
            self.executionId = executionId
            self.startedAt = startedAt
            self.status = status
            self.targetArn = targetArn
        }

        private enum CodingKeys: String, CodingKey {
            case commandArn = "commandArn"
            case completedAt = "completedAt"
            case createdAt = "createdAt"
            case executionId = "executionId"
            case startedAt = "startedAt"
            case status = "status"
            case targetArn = "targetArn"
        }
    }

    public struct CommandParameter: AWSEncodableShape & AWSDecodableShape {
        /// The default value used to describe the command. This is the value assumed by the parameter if no other value is assigned to it.
        public let defaultValue: CommandParameterValue?
        /// The description of the command parameter.
        public let description: String?
        /// The name of a specific parameter used in a command and command execution.
        public let name: String
        /// The value used to describe the command. When you assign a value to a parameter, it will override any default value that you had already specified.
        public let value: CommandParameterValue?

        @inlinable
        public init(defaultValue: CommandParameterValue? = nil, description: String? = nil, name: String, value: CommandParameterValue? = nil) {
            self.defaultValue = defaultValue
            self.description = description
            self.name = name
            self.value = value
        }

        public func validate(name: String) throws {
            try self.defaultValue?.validate(name: "\(name).defaultValue")
            try self.validate(self.description, name: "description", parent: name, max: 2028)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[^\\p{C}]*$")
            try self.validate(self.name, name: "name", parent: name, max: 192)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[.$a-zA-Z0-9_-]+$")
            try self.value?.validate(name: "\(name).value")
        }

        private enum CodingKeys: String, CodingKey {
            case defaultValue = "defaultValue"
            case description = "description"
            case name = "name"
            case value = "value"
        }
    }

    public struct CommandParameterValue: AWSEncodableShape & AWSDecodableShape {
        /// An attribute of type Boolean. For example:  "BOOL": true
        public let b: Bool?
        /// An attribute of type Binary. For example:  "B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
        public let bin: AWSBase64Data?
        /// An attribute of type Double (Sixty-Four Bits).
        public let d: Double?
        /// An attribute of type Integer (Thirty-Two Bits).
        public let i: Int?
        /// An attribute of type Long.
        public let l: Int64?
        /// An attribute of type String. For example:  "S": "Hello"
        public let s: String?
        /// An attribute of type unsigned long.
        public let ul: String?

        @inlinable
        public init(b: Bool? = nil, bin: AWSBase64Data? = nil, d: Double? = nil, i: Int? = nil, l: Int64? = nil, s: String? = nil, ul: String? = nil) {
            self.b = b
            self.bin = bin
            self.d = d
            self.i = i
            self.l = l
            self.s = s
            self.ul = ul
        }

        public func validate(name: String) throws {
            try self.validate(self.bin, name: "bin", parent: name, min: 1)
            try self.validate(self.s, name: "s", parent: name, min: 1)
            try self.validate(self.ul, name: "ul", parent: name, max: 20)
            try self.validate(self.ul, name: "ul", parent: name, min: 1)
            try self.validate(self.ul, name: "ul", parent: name, pattern: "^[0-9]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case b = "B"
            case bin = "BIN"
            case d = "D"
            case i = "I"
            case l = "L"
            case s = "S"
            case ul = "UL"
        }
    }

    public struct CommandPayload: AWSEncodableShape & AWSDecodableShape {
        /// The static payload file for the command.
        public let content: AWSBase64Data?
        /// The content type that specifies the format type of the payload file. This field must use a type/subtype format, such as application/json. For information about various content types, see Common MIME types.
        public let contentType: String?

        @inlinable
        public init(content: AWSBase64Data? = nil, contentType: String? = nil) {
            self.content = content
            self.contentType = contentType
        }

        public func validate(name: String) throws {
            try self.validate(self.contentType, name: "contentType", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case content = "content"
            case contentType = "contentType"
        }
    }

    public struct CommandSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the command.
        public let commandArn: String?
        /// The unique identifier of the command.
        public let commandId: String?
        /// The timestamp, when the command was created.
        public let createdAt: Date?
        /// Indicates whether the command has been deprecated.
        public let deprecated: Bool?
        /// The display name of the command.
        public let displayName: String?
        /// The timestamp, when the command was last updated.
        public let lastUpdatedAt: Date?
        /// Indicates whether the command is pending deletion.
        public let pendingDeletion: Bool?

        @inlinable
        public init(commandArn: String? = nil, commandId: String? = nil, createdAt: Date? = nil, deprecated: Bool? = nil, displayName: String? = nil, lastUpdatedAt: Date? = nil, pendingDeletion: Bool? = nil) {
            self.commandArn = commandArn
            self.commandId = commandId
            self.createdAt = createdAt
            self.deprecated = deprecated
            self.displayName = displayName
            self.lastUpdatedAt = lastUpdatedAt
            self.pendingDeletion = pendingDeletion
        }

        private enum CodingKeys: String, CodingKey {
            case commandArn = "commandArn"
            case commandId = "commandId"
            case createdAt = "createdAt"
            case deprecated = "deprecated"
            case displayName = "displayName"
            case lastUpdatedAt = "lastUpdatedAt"
            case pendingDeletion = "pendingDeletion"
        }
    }

    public struct Configuration: AWSEncodableShape & AWSDecodableShape {
        /// True to enable the configuration.
        public let enabled: Bool?

        @inlinable
        public init(enabled: Bool? = nil) {
            self.enabled = enabled
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
        }
    }

    public struct ConfirmTopicRuleDestinationRequest: AWSEncodableShape {
        /// The token used to confirm ownership or access to the topic rule confirmation URL.
        public let confirmationToken: String

        @inlinable
        public init(confirmationToken: String) {
            self.confirmationToken = confirmationToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.confirmationToken, key: "confirmationToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.confirmationToken, name: "confirmationToken", parent: name, max: 2048)
            try self.validate(self.confirmationToken, name: "confirmationToken", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ConfirmTopicRuleDestinationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct ConflictException: AWSErrorShape {
        public let message: String?
        /// A resource with the same name already exists.
        public let resourceId: String?

        @inlinable
        public init(message: String? = nil, resourceId: String? = nil) {
            self.message = message
            self.resourceId = resourceId
        }

        private enum CodingKeys: String, CodingKey {
            case message = "message"
            case resourceId = "resourceId"
        }
    }

    public struct CreateAuditSuppressionRequest: AWSEncodableShape {
        public let checkName: String
        ///  Each audit supression must have a unique client request token. If you try to create a new audit suppression with the same token as one that already exists, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.
        public let clientRequestToken: String
        ///  The description of the audit suppression.
        public let description: String?
        ///  The epoch timestamp in seconds at which this suppression expires.
        public let expirationDate: Date?
        public let resourceIdentifier: ResourceIdentifier
        ///  Indicates whether a suppression should exist indefinitely or not.
        public let suppressIndefinitely: Bool?

        @inlinable
        public init(checkName: String, clientRequestToken: String = CreateAuditSuppressionRequest.idempotencyToken(), description: String? = nil, expirationDate: Date? = nil, resourceIdentifier: ResourceIdentifier, suppressIndefinitely: Bool? = nil) {
            self.checkName = checkName
            self.clientRequestToken = clientRequestToken
            self.description = description
            self.expirationDate = expirationDate
            self.resourceIdentifier = resourceIdentifier
            self.suppressIndefinitely = suppressIndefinitely
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-_]+$")
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\p{Graph}\\x20]*$")
            try self.resourceIdentifier.validate(name: "\(name).resourceIdentifier")
        }

        private enum CodingKeys: String, CodingKey {
            case checkName = "checkName"
            case clientRequestToken = "clientRequestToken"
            case description = "description"
            case expirationDate = "expirationDate"
            case resourceIdentifier = "resourceIdentifier"
            case suppressIndefinitely = "suppressIndefinitely"
        }
    }

    public struct CreateAuditSuppressionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CreateAuthorizerRequest: AWSEncodableShape {
        /// The ARN of the authorizer's Lambda function.
        public let authorizerFunctionArn: String
        /// The authorizer name.
        public let authorizerName: String
        /// When true, the result from the authorizer’s Lambda function is
        /// 	  cached for clients that use persistent HTTP connections. The results are cached for the time
        /// 	  specified by the Lambda function in refreshAfterInSeconds. This value does not affect authorization of clients that use MQTT connections. The default value is false.
        public let enableCachingForHttp: Bool?
        /// Specifies whether IoT validates the token signature in an authorization request.
        public let signingDisabled: Bool?
        /// The status of the create authorizer request.
        public let status: AuthorizerStatus?
        /// Metadata which can be used to manage the custom authorizer.  For URI Request parameters use format: ...key1=value1&key2=value2... For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
        public let tags: [Tag]?
        /// The name of the token key used to extract the token from the HTTP headers.
        public let tokenKeyName: String?
        /// The public keys used to verify the digital signature returned by your custom authentication service.
        public let tokenSigningPublicKeys: [String: String]?

        @inlinable
        public init(authorizerFunctionArn: String, authorizerName: String, enableCachingForHttp: Bool? = nil, signingDisabled: Bool? = nil, status: AuthorizerStatus? = nil, tags: [Tag]? = nil, tokenKeyName: String? = nil, tokenSigningPublicKeys: [String: String]? = nil) {
            self.authorizerFunctionArn = authorizerFunctionArn
            self.authorizerName = authorizerName
            self.enableCachingForHttp = enableCachingForHttp
            self.signingDisabled = signingDisabled
            self.status = status
            self.tags = tags
            self.tokenKeyName = tokenKeyName
            self.tokenSigningPublicKeys = tokenSigningPublicKeys
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.authorizerFunctionArn, forKey: .authorizerFunctionArn)
            request.encodePath(self.authorizerName, key: "authorizerName")
            try container.encodeIfPresent(self.enableCachingForHttp, forKey: .enableCachingForHttp)
            try container.encodeIfPresent(self.signingDisabled, forKey: .signingDisabled)
            try container.encodeIfPresent(self.status, forKey: .status)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            try container.encodeIfPresent(self.tokenKeyName, forKey: .tokenKeyName)
            try container.encodeIfPresent(self.tokenSigningPublicKeys, forKey: .tokenSigningPublicKeys)
        }

        public func validate(name: String) throws {
            try self.validate(self.authorizerFunctionArn, name: "authorizerFunctionArn", parent: name, max: 2048)
            try self.validate(self.authorizerFunctionArn, name: "authorizerFunctionArn", parent: name, pattern: "^[\\s\\S]*$")
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, max: 128)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, min: 1)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, pattern: "^[\\w=,@-]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tokenKeyName, name: "tokenKeyName", parent: name, max: 128)
            try self.validate(self.tokenKeyName, name: "tokenKeyName", parent: name, min: 1)
            try self.validate(self.tokenKeyName, name: "tokenKeyName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.tokenSigningPublicKeys?.forEach {
                try validate($0.key, name: "tokenSigningPublicKeys.key", parent: name, max: 128)
                try validate($0.key, name: "tokenSigningPublicKeys.key", parent: name, min: 1)
                try validate($0.key, name: "tokenSigningPublicKeys.key", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
                try validate($0.value, name: "tokenSigningPublicKeys[\"\($0.key)\"]", parent: name, max: 5120)
                try validate($0.value, name: "tokenSigningPublicKeys[\"\($0.key)\"]", parent: name, pattern: "^[\\s\\S]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerFunctionArn = "authorizerFunctionArn"
            case enableCachingForHttp = "enableCachingForHttp"
            case signingDisabled = "signingDisabled"
            case status = "status"
            case tags = "tags"
            case tokenKeyName = "tokenKeyName"
            case tokenSigningPublicKeys = "tokenSigningPublicKeys"
        }
    }

    public struct CreateAuthorizerResponse: AWSDecodableShape {
        /// The authorizer ARN.
        public let authorizerArn: String?
        /// The authorizer's name.
        public let authorizerName: String?

        @inlinable
        public init(authorizerArn: String? = nil, authorizerName: String? = nil) {
            self.authorizerArn = authorizerArn
            self.authorizerName = authorizerName
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerArn = "authorizerArn"
            case authorizerName = "authorizerName"
        }
    }

    public struct CreateBillingGroupRequest: AWSEncodableShape {
        /// The name you wish to give to the billing group.
        public let billingGroupName: String
        /// The properties of the billing group.
        public let billingGroupProperties: BillingGroupProperties?
        /// Metadata which can be used to manage the billing group.
        public let tags: [Tag]?

        @inlinable
        public init(billingGroupName: String, billingGroupProperties: BillingGroupProperties? = nil, tags: [Tag]? = nil) {
            self.billingGroupName = billingGroupName
            self.billingGroupProperties = billingGroupProperties
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.billingGroupName, key: "billingGroupName")
            try container.encodeIfPresent(self.billingGroupProperties, forKey: .billingGroupProperties)
            try container.encodeIfPresent(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, max: 128)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, min: 1)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.billingGroupProperties?.validate(name: "\(name).billingGroupProperties")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case billingGroupProperties = "billingGroupProperties"
            case tags = "tags"
        }
    }

    public struct CreateBillingGroupResponse: AWSDecodableShape {
        /// The ARN of the billing group.
        public let billingGroupArn: String?
        /// The ID of the billing group.
        public let billingGroupId: String?
        /// The name you gave to the billing group.
        public let billingGroupName: String?

        @inlinable
        public init(billingGroupArn: String? = nil, billingGroupId: String? = nil, billingGroupName: String? = nil) {
            self.billingGroupArn = billingGroupArn
            self.billingGroupId = billingGroupId
            self.billingGroupName = billingGroupName
        }

        private enum CodingKeys: String, CodingKey {
            case billingGroupArn = "billingGroupArn"
            case billingGroupId = "billingGroupId"
            case billingGroupName = "billingGroupName"
        }
    }

    public struct CreateCertificateFromCsrRequest: AWSEncodableShape {
        /// The certificate signing request (CSR).
        public let certificateSigningRequest: String
        /// Specifies whether the certificate is active.
        public let setAsActive: Bool?

        @inlinable
        public init(certificateSigningRequest: String, setAsActive: Bool? = nil) {
            self.certificateSigningRequest = certificateSigningRequest
            self.setAsActive = setAsActive
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.certificateSigningRequest, forKey: .certificateSigningRequest)
            request.encodeQuery(self.setAsActive, key: "setAsActive")
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateSigningRequest, name: "certificateSigningRequest", parent: name, max: 4096)
            try self.validate(self.certificateSigningRequest, name: "certificateSigningRequest", parent: name, min: 1)
            try self.validate(self.certificateSigningRequest, name: "certificateSigningRequest", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case certificateSigningRequest = "certificateSigningRequest"
        }
    }

    public struct CreateCertificateFromCsrResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the certificate. You can use the ARN as a principal for policy operations.
        public let certificateArn: String?
        /// The ID of the certificate. Certificate management operations only take a certificateId.
        public let certificateId: String?
        /// The certificate data, in PEM format.
        public let certificatePem: String?

        @inlinable
        public init(certificateArn: String? = nil, certificateId: String? = nil, certificatePem: String? = nil) {
            self.certificateArn = certificateArn
            self.certificateId = certificateId
            self.certificatePem = certificatePem
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn = "certificateArn"
            case certificateId = "certificateId"
            case certificatePem = "certificatePem"
        }
    }

    public struct CreateCertificateProviderRequest: AWSEncodableShape {
        /// A list of the operations that the certificate provider will use to generate certificates.  Valid value: CreateCertificateFromCsr.
        public let accountDefaultForOperations: [CertificateProviderOperation]
        /// The name of the certificate provider.
        public let certificateProviderName: String
        /// A string that you can optionally pass in the CreateCertificateProvider request to make sure  the request is idempotent.
        public let clientToken: String?
        /// The ARN of the Lambda function that defines the authentication logic.
        public let lambdaFunctionArn: String
        /// Metadata which can be used to manage the certificate provider.
        public let tags: [Tag]?

        @inlinable
        public init(accountDefaultForOperations: [CertificateProviderOperation], certificateProviderName: String, clientToken: String? = CreateCertificateProviderRequest.idempotencyToken(), lambdaFunctionArn: String, tags: [Tag]? = nil) {
            self.accountDefaultForOperations = accountDefaultForOperations
            self.certificateProviderName = certificateProviderName
            self.clientToken = clientToken
            self.lambdaFunctionArn = lambdaFunctionArn
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.accountDefaultForOperations, forKey: .accountDefaultForOperations)
            request.encodePath(self.certificateProviderName, key: "certificateProviderName")
            try container.encodeIfPresent(self.clientToken, forKey: .clientToken)
            try container.encode(self.lambdaFunctionArn, forKey: .lambdaFunctionArn)
            try container.encodeIfPresent(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.validate(self.accountDefaultForOperations, name: "accountDefaultForOperations", parent: name, max: 1)
            try self.validate(self.accountDefaultForOperations, name: "accountDefaultForOperations", parent: name, min: 1)
            try self.validate(self.certificateProviderName, name: "certificateProviderName", parent: name, max: 128)
            try self.validate(self.certificateProviderName, name: "certificateProviderName", parent: name, min: 1)
            try self.validate(self.certificateProviderName, name: "certificateProviderName", parent: name, pattern: "^[\\w=,@-]+$")
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 36)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^\\S{36,64}$")
            try self.validate(self.lambdaFunctionArn, name: "lambdaFunctionArn", parent: name, max: 2048)
            try self.validate(self.lambdaFunctionArn, name: "lambdaFunctionArn", parent: name, pattern: "^[\\s\\S]*$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case accountDefaultForOperations = "accountDefaultForOperations"
            case clientToken = "clientToken"
            case lambdaFunctionArn = "lambdaFunctionArn"
            case tags = "tags"
        }
    }

    public struct CreateCertificateProviderResponse: AWSDecodableShape {
        /// The ARN of the certificate provider.
        public let certificateProviderArn: String?
        /// The name of the certificate provider.
        public let certificateProviderName: String?

        @inlinable
        public init(certificateProviderArn: String? = nil, certificateProviderName: String? = nil) {
            self.certificateProviderArn = certificateProviderArn
            self.certificateProviderName = certificateProviderName
        }

        private enum CodingKeys: String, CodingKey {
            case certificateProviderArn = "certificateProviderArn"
            case certificateProviderName = "certificateProviderName"
        }
    }

    public struct CreateCommandRequest: AWSEncodableShape {
        /// A unique identifier for the command. We recommend using UUID. Alpha-numeric characters, hyphens, and underscores are valid for use here.
        public let commandId: String
        /// A short text decription of the command.
        public let description: String?
        /// The user-friendly name in the console for the command. This name doesn't have to be unique. You can update the user-friendly name after you define it.
        public let displayName: String?
        /// A list of parameters that are required by the StartCommandExecution API. These parameters need to be specified only when using the AWS-IoT-FleetWise namespace. You can either specify them here or when running the command using the StartCommandExecution API.
        public let mandatoryParameters: [CommandParameter]?
        /// The namespace of the command. The MQTT reserved topics and validations will be used for command executions according to the namespace setting.
        public let namespace: CommandNamespace?
        /// The payload object for the command. You must specify this information when using the AWS-IoT namespace. You can upload a static payload file from your local storage that contains the  instructions for the device to process. The payload file can use any format. To make sure that the device correctly interprets the payload, we recommend you to specify the payload content type.
        public let payload: CommandPayload?
        /// The IAM role that you must provide when using the AWS-IoT-FleetWise namespace. The role grants IoT Device Management the permission to access IoT FleetWise resources  for generating the payload for the command. This field is not required when you use the AWS-IoT namespace.
        public let roleArn: String?
        /// Name-value pairs that are used as metadata to manage a command.
        public let tags: [Tag]?

        @inlinable
        public init(commandId: String, description: String? = nil, displayName: String? = nil, mandatoryParameters: [CommandParameter]? = nil, namespace: CommandNamespace? = nil, payload: CommandPayload? = nil, roleArn: String? = nil, tags: [Tag]? = nil) {
            self.commandId = commandId
            self.description = description
            self.displayName = displayName
            self.mandatoryParameters = mandatoryParameters
            self.namespace = namespace
            self.payload = payload
            self.roleArn = roleArn
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.commandId, key: "commandId")
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encodeIfPresent(self.displayName, forKey: .displayName)
            try container.encodeIfPresent(self.mandatoryParameters, forKey: .mandatoryParameters)
            try container.encodeIfPresent(self.namespace, forKey: .namespace)
            try container.encodeIfPresent(self.payload, forKey: .payload)
            try container.encodeIfPresent(self.roleArn, forKey: .roleArn)
            try container.encodeIfPresent(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.validate(self.commandId, name: "commandId", parent: name, max: 64)
            try self.validate(self.commandId, name: "commandId", parent: name, min: 1)
            try self.validate(self.commandId, name: "commandId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.description, name: "description", parent: name, max: 2028)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[^\\p{C}]*$")
            try self.validate(self.displayName, name: "displayName", parent: name, max: 64)
            try self.validate(self.displayName, name: "displayName", parent: name, pattern: "^[^\\p{C}]*$")
            try self.mandatoryParameters?.forEach {
                try $0.validate(name: "\(name).mandatoryParameters[]")
            }
            try self.validate(self.mandatoryParameters, name: "mandatoryParameters", parent: name, min: 1)
            try self.payload?.validate(name: "\(name).payload")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case displayName = "displayName"
            case mandatoryParameters = "mandatoryParameters"
            case namespace = "namespace"
            case payload = "payload"
            case roleArn = "roleArn"
            case tags = "tags"
        }
    }

    public struct CreateCommandResponse: AWSDecodableShape {
        /// The Amazon Resource Number (ARN) of the command. For example, arn:aws:iot:::command/
        public let commandArn: String?
        /// The unique identifier for the command.
        public let commandId: String?

        @inlinable
        public init(commandArn: String? = nil, commandId: String? = nil) {
            self.commandArn = commandArn
            self.commandId = commandId
        }

        private enum CodingKeys: String, CodingKey {
            case commandArn = "commandArn"
            case commandId = "commandId"
        }
    }

    public struct CreateCustomMetricRequest: AWSEncodableShape {
        /// Each custom metric must have a unique client request token. If you try to create a new custom metric that already exists with a different token, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.
        public let clientRequestToken: String
        ///  The friendly name in the console for the custom metric. This name doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. You can update the friendly name after you define it.
        public let displayName: String?
        ///  The name of the custom metric. This will be used in the metric report submitted from the device/thing. The name can't begin with aws:. You can't change the name after you define it.
        public let metricName: String
        ///  The type of the custom metric.   The type number only takes a single metric value as an input, but when you submit the metrics value in the DeviceMetrics report, you must pass it as an array with a single value.
        public let metricType: CustomMetricType
        ///  Metadata that can be used to manage the custom metric.
        public let tags: [Tag]?

        @inlinable
        public init(clientRequestToken: String = CreateCustomMetricRequest.idempotencyToken(), displayName: String? = nil, metricName: String, metricType: CustomMetricType, tags: [Tag]? = nil) {
            self.clientRequestToken = clientRequestToken
            self.displayName = displayName
            self.metricName = metricName
            self.metricType = metricType
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.clientRequestToken, forKey: .clientRequestToken)
            try container.encodeIfPresent(self.displayName, forKey: .displayName)
            request.encodePath(self.metricName, key: "metricName")
            try container.encode(self.metricType, forKey: .metricType)
            try container.encodeIfPresent(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-_]+$")
            try self.validate(self.displayName, name: "displayName", parent: name, max: 128)
            try self.validate(self.displayName, name: "displayName", parent: name, pattern: "^[\\p{Graph}\\x20]*$")
            try self.validate(self.metricName, name: "metricName", parent: name, max: 128)
            try self.validate(self.metricName, name: "metricName", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "clientRequestToken"
            case displayName = "displayName"
            case metricType = "metricType"
            case tags = "tags"
        }
    }

    public struct CreateCustomMetricResponse: AWSDecodableShape {
        ///  The Amazon Resource Number (ARN) of the custom metric. For example, arn:aws-partition:iot:region:accountId:custommetric/metricName
        public let metricArn: String?
        ///  The name of the custom metric to be used in the metric report.
        public let metricName: String?

        @inlinable
        public init(metricArn: String? = nil, metricName: String? = nil) {
            self.metricArn = metricArn
            self.metricName = metricName
        }

        private enum CodingKeys: String, CodingKey {
            case metricArn = "metricArn"
            case metricName = "metricName"
        }
    }

    public struct CreateDimensionRequest: AWSEncodableShape {
        /// Each dimension must have a unique client request token. If you try to create a new dimension with the same token as a dimension that already exists, an exception occurs.  If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.
        public let clientRequestToken: String
        /// A unique identifier for the dimension. Choose something that describes the type and value to make it easy to remember what it does.
        public let name: String
        /// Specifies the value or list of values for the dimension. For TOPIC_FILTER dimensions, this is a pattern used to match the MQTT topic (for example, "admin/#").
        public let stringValues: [String]
        /// Metadata that can be used to manage the dimension.
        public let tags: [Tag]?
        /// Specifies the type of dimension. Supported types: TOPIC_FILTER.
        public let type: DimensionType

        @inlinable
        public init(clientRequestToken: String = CreateDimensionRequest.idempotencyToken(), name: String, stringValues: [String], tags: [Tag]? = nil, type: DimensionType) {
            self.clientRequestToken = clientRequestToken
            self.name = name
            self.stringValues = stringValues
            self.tags = tags
            self.type = type
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.clientRequestToken, forKey: .clientRequestToken)
            request.encodePath(self.name, key: "name")
            try container.encode(self.stringValues, forKey: .stringValues)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            try container.encode(self.type, forKey: .type)
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-_]+$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.stringValues.forEach {
                try validate($0, name: "stringValues[]", parent: name, max: 256)
                try validate($0, name: "stringValues[]", parent: name, min: 1)
            }
            try self.validate(self.stringValues, name: "stringValues", parent: name, max: 100)
            try self.validate(self.stringValues, name: "stringValues", parent: name, min: 1)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "clientRequestToken"
            case stringValues = "stringValues"
            case tags = "tags"
            case type = "type"
        }
    }

    public struct CreateDimensionResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the created dimension.
        public let arn: String?
        /// A unique identifier for the dimension.
        public let name: String?

        @inlinable
        public init(arn: String? = nil, name: String? = nil) {
            self.arn = arn
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case name = "name"
        }
    }

    public struct CreateDomainConfigurationRequest: AWSEncodableShape {
        /// An enumerated string that speciﬁes the application-layer protocol.    SECURE_MQTT - MQTT over TLS.      MQTT_WSS - MQTT over WebSocket.      HTTPS - HTTP over TLS.      DEFAULT - Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify application_layer protocol.  For more information, see Device communication protocols.
        public let applicationProtocol: ApplicationProtocol?
        /// An enumerated string that speciﬁes the authentication type.    CUSTOM_AUTH_X509 - Use custom authentication and authorization with additional details from the X.509 client certificate.      CUSTOM_AUTH - Use custom authentication and authorization. For more information, see Custom authentication and authorization.      AWS_X509 - Use X.509 client certificates without custom authentication and authorization. For more information, see X.509 client certificates.      AWS_SIGV4 - Use Amazon Web Services Signature Version 4. For more information, see IAM users, groups, and roles.      DEFAULT - Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify authentication type. For more information, see Device communication protocols.
        public let authenticationType: AuthenticationType?
        /// An object that specifies the authorization service for a domain.
        public let authorizerConfig: AuthorizerConfig?
        /// An object that speciﬁes the client certificate conﬁguration for a domain.
        public let clientCertificateConfig: ClientCertificateConfig?
        /// The name of the domain configuration. This value must be unique to a region.
        public let domainConfigurationName: String
        /// The name of the domain.
        public let domainName: String?
        /// The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN.  This value is not required for Amazon Web Services-managed domains.
        public let serverCertificateArns: [String]?
        /// The server certificate configuration.
        public let serverCertificateConfig: ServerCertificateConfig?
        /// The type of service delivered by the endpoint.  Amazon Web Services IoT Core currently supports only the DATA service type.
        public let serviceType: ServiceType?
        /// Metadata which can be used to manage the domain configuration.  For URI Request parameters use format: ...key1=value1&key2=value2... For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
        public let tags: [Tag]?
        /// An object that specifies the TLS configuration for a domain.
        public let tlsConfig: TlsConfig?
        /// The certificate used to validate the server certificate and prove domain name ownership. This certificate must be signed by a public certificate authority.  This value is not required for Amazon Web Services-managed domains.
        public let validationCertificateArn: String?

        @inlinable
        public init(applicationProtocol: ApplicationProtocol? = nil, authenticationType: AuthenticationType? = nil, authorizerConfig: AuthorizerConfig? = nil, clientCertificateConfig: ClientCertificateConfig? = nil, domainConfigurationName: String, domainName: String? = nil, serverCertificateArns: [String]? = nil, serverCertificateConfig: ServerCertificateConfig? = nil, serviceType: ServiceType? = nil, tags: [Tag]? = nil, tlsConfig: TlsConfig? = nil, validationCertificateArn: String? = nil) {
            self.applicationProtocol = applicationProtocol
            self.authenticationType = authenticationType
            self.authorizerConfig = authorizerConfig
            self.clientCertificateConfig = clientCertificateConfig
            self.domainConfigurationName = domainConfigurationName
            self.domainName = domainName
            self.serverCertificateArns = serverCertificateArns
            self.serverCertificateConfig = serverCertificateConfig
            self.serviceType = serviceType
            self.tags = tags
            self.tlsConfig = tlsConfig
            self.validationCertificateArn = validationCertificateArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.applicationProtocol, forKey: .applicationProtocol)
            try container.encodeIfPresent(self.authenticationType, forKey: .authenticationType)
            try container.encodeIfPresent(self.authorizerConfig, forKey: .authorizerConfig)
            try container.encodeIfPresent(self.clientCertificateConfig, forKey: .clientCertificateConfig)
            request.encodePath(self.domainConfigurationName, key: "domainConfigurationName")
            try container.encodeIfPresent(self.domainName, forKey: .domainName)
            try container.encodeIfPresent(self.serverCertificateArns, forKey: .serverCertificateArns)
            try container.encodeIfPresent(self.serverCertificateConfig, forKey: .serverCertificateConfig)
            try container.encodeIfPresent(self.serviceType, forKey: .serviceType)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            try container.encodeIfPresent(self.tlsConfig, forKey: .tlsConfig)
            try container.encodeIfPresent(self.validationCertificateArn, forKey: .validationCertificateArn)
        }

        public func validate(name: String) throws {
            try self.authorizerConfig?.validate(name: "\(name).authorizerConfig")
            try self.clientCertificateConfig?.validate(name: "\(name).clientCertificateConfig")
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, max: 128)
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, min: 1)
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, pattern: "^[\\w.-]+$")
            try self.validate(self.domainName, name: "domainName", parent: name, max: 253)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.validate(self.domainName, name: "domainName", parent: name, pattern: "^[\\s\\S]*$")
            try self.serverCertificateArns?.forEach {
                try validate($0, name: "serverCertificateArns[]", parent: name, max: 2048)
                try validate($0, name: "serverCertificateArns[]", parent: name, min: 1)
                try validate($0, name: "serverCertificateArns[]", parent: name, pattern: "^arn:aws(-cn|-us-gov|-iso-b|-iso)?:acm:[a-z]{2}-(gov-|iso-|isob-)?[a-z]{4,9}-\\d{1}:\\d{12}:certificate/[a-zA-Z0-9/-]+$")
            }
            try self.validate(self.serverCertificateArns, name: "serverCertificateArns", parent: name, max: 1)
            try self.serverCertificateConfig?.validate(name: "\(name).serverCertificateConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.tlsConfig?.validate(name: "\(name).tlsConfig")
            try self.validate(self.validationCertificateArn, name: "validationCertificateArn", parent: name, max: 2048)
            try self.validate(self.validationCertificateArn, name: "validationCertificateArn", parent: name, min: 1)
            try self.validate(self.validationCertificateArn, name: "validationCertificateArn", parent: name, pattern: "^arn:aws(-cn|-us-gov|-iso-b|-iso)?:acm:[a-z]{2}-(gov-|iso-|isob-)?[a-z]{4,9}-\\d{1}:\\d{12}:certificate/[a-zA-Z0-9/-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationProtocol = "applicationProtocol"
            case authenticationType = "authenticationType"
            case authorizerConfig = "authorizerConfig"
            case clientCertificateConfig = "clientCertificateConfig"
            case domainName = "domainName"
            case serverCertificateArns = "serverCertificateArns"
            case serverCertificateConfig = "serverCertificateConfig"
            case serviceType = "serviceType"
            case tags = "tags"
            case tlsConfig = "tlsConfig"
            case validationCertificateArn = "validationCertificateArn"
        }
    }

    public struct CreateDomainConfigurationResponse: AWSDecodableShape {
        /// The ARN of the domain configuration.
        public let domainConfigurationArn: String?
        /// The name of the domain configuration.
        public let domainConfigurationName: String?

        @inlinable
        public init(domainConfigurationArn: String? = nil, domainConfigurationName: String? = nil) {
            self.domainConfigurationArn = domainConfigurationArn
            self.domainConfigurationName = domainConfigurationName
        }

        private enum CodingKeys: String, CodingKey {
            case domainConfigurationArn = "domainConfigurationArn"
            case domainConfigurationName = "domainConfigurationName"
        }
    }

    public struct CreateDynamicThingGroupRequest: AWSEncodableShape {
        /// The dynamic thing group index name.  Currently one index is supported: AWS_Things.
        public let indexName: String?
        /// The dynamic thing group search query string. See Query Syntax for information about query string syntax.
        public let queryString: String
        /// The dynamic thing group query version.  Currently one query version is supported: "2017-09-30". If not specified, the
        /// 				query version defaults to this value.
        public let queryVersion: String?
        /// Metadata which can be used to manage the dynamic thing group.
        public let tags: [Tag]?
        /// The dynamic thing group name to create.
        public let thingGroupName: String
        /// The dynamic thing group properties.
        public let thingGroupProperties: ThingGroupProperties?

        @inlinable
        public init(indexName: String? = nil, queryString: String, queryVersion: String? = nil, tags: [Tag]? = nil, thingGroupName: String, thingGroupProperties: ThingGroupProperties? = nil) {
            self.indexName = indexName
            self.queryString = queryString
            self.queryVersion = queryVersion
            self.tags = tags
            self.thingGroupName = thingGroupName
            self.thingGroupProperties = thingGroupProperties
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.indexName, forKey: .indexName)
            try container.encode(self.queryString, forKey: .queryString)
            try container.encodeIfPresent(self.queryVersion, forKey: .queryVersion)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            request.encodePath(self.thingGroupName, key: "thingGroupName")
            try container.encodeIfPresent(self.thingGroupProperties, forKey: .thingGroupProperties)
        }

        public func validate(name: String) throws {
            try self.validate(self.indexName, name: "indexName", parent: name, max: 128)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.thingGroupProperties?.validate(name: "\(name).thingGroupProperties")
        }

        private enum CodingKeys: String, CodingKey {
            case indexName = "indexName"
            case queryString = "queryString"
            case queryVersion = "queryVersion"
            case tags = "tags"
            case thingGroupProperties = "thingGroupProperties"
        }
    }

    public struct CreateDynamicThingGroupResponse: AWSDecodableShape {
        /// The dynamic thing group index name.
        public let indexName: String?
        /// The dynamic thing group search query string.
        public let queryString: String?
        /// The dynamic thing group query version.
        public let queryVersion: String?
        /// The dynamic thing group ARN.
        public let thingGroupArn: String?
        /// The dynamic thing group ID.
        public let thingGroupId: String?
        /// The dynamic thing group name.
        public let thingGroupName: String?

        @inlinable
        public init(indexName: String? = nil, queryString: String? = nil, queryVersion: String? = nil, thingGroupArn: String? = nil, thingGroupId: String? = nil, thingGroupName: String? = nil) {
            self.indexName = indexName
            self.queryString = queryString
            self.queryVersion = queryVersion
            self.thingGroupArn = thingGroupArn
            self.thingGroupId = thingGroupId
            self.thingGroupName = thingGroupName
        }

        private enum CodingKeys: String, CodingKey {
            case indexName = "indexName"
            case queryString = "queryString"
            case queryVersion = "queryVersion"
            case thingGroupArn = "thingGroupArn"
            case thingGroupId = "thingGroupId"
            case thingGroupName = "thingGroupName"
        }
    }

    public struct CreateFleetMetricRequest: AWSEncodableShape {
        /// The field to aggregate.
        public let aggregationField: String
        /// The type of the aggregation query.
        public let aggregationType: AggregationType
        /// The fleet metric description.
        public let description: String?
        /// The name of the index to search.
        public let indexName: String?
        /// The name of the fleet metric to create.
        public let metricName: String
        /// The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 day)] and must be multiple of 60.
        public let period: Int
        /// The search query string.
        public let queryString: String
        /// The query version.
        public let queryVersion: String?
        /// Metadata, which can be used to manage the fleet metric.
        public let tags: [Tag]?
        /// Used to support unit transformation such as milliseconds to seconds. The unit must be supported by CW metric. Default to null.
        public let unit: FleetMetricUnit?

        @inlinable
        public init(aggregationField: String, aggregationType: AggregationType, description: String? = nil, indexName: String? = nil, metricName: String, period: Int, queryString: String, queryVersion: String? = nil, tags: [Tag]? = nil, unit: FleetMetricUnit? = nil) {
            self.aggregationField = aggregationField
            self.aggregationType = aggregationType
            self.description = description
            self.indexName = indexName
            self.metricName = metricName
            self.period = period
            self.queryString = queryString
            self.queryVersion = queryVersion
            self.tags = tags
            self.unit = unit
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.aggregationField, forKey: .aggregationField)
            try container.encode(self.aggregationType, forKey: .aggregationType)
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encodeIfPresent(self.indexName, forKey: .indexName)
            request.encodePath(self.metricName, key: "metricName")
            try container.encode(self.period, forKey: .period)
            try container.encode(self.queryString, forKey: .queryString)
            try container.encodeIfPresent(self.queryVersion, forKey: .queryVersion)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            try container.encodeIfPresent(self.unit, forKey: .unit)
        }

        public func validate(name: String) throws {
            try self.validate(self.aggregationField, name: "aggregationField", parent: name, min: 1)
            try self.aggregationType.validate(name: "\(name).aggregationType")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\p{Graph}\\x20]*$")
            try self.validate(self.indexName, name: "indexName", parent: name, max: 128)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.metricName, name: "metricName", parent: name, max: 128)
            try self.validate(self.metricName, name: "metricName", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "^[a-zA-Z0-9_\\-\\.]+$")
            try self.validate(self.period, name: "period", parent: name, max: 86400)
            try self.validate(self.period, name: "period", parent: name, min: 60)
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case aggregationField = "aggregationField"
            case aggregationType = "aggregationType"
            case description = "description"
            case indexName = "indexName"
            case period = "period"
            case queryString = "queryString"
            case queryVersion = "queryVersion"
            case tags = "tags"
            case unit = "unit"
        }
    }

    public struct CreateFleetMetricResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the new fleet metric.
        public let metricArn: String?
        /// The name of the fleet metric to create.
        public let metricName: String?

        @inlinable
        public init(metricArn: String? = nil, metricName: String? = nil) {
            self.metricArn = metricArn
            self.metricName = metricName
        }

        private enum CodingKeys: String, CodingKey {
            case metricArn = "metricArn"
            case metricName = "metricName"
        }
    }

    public struct CreateJobRequest: AWSEncodableShape {
        /// Allows you to create the criteria to abort a job.
        public let abortConfig: AbortConfig?
        /// A short text description of the job.
        public let description: String?
        /// The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.   Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.
        public let destinationPackageVersions: [String]?
        /// The job document. Required if you don't specify a value for documentSource.
        public let document: String?
        /// Parameters of an Amazon Web Services managed template that you can specify to create the job document.   documentParameters can only be used when creating jobs from Amazon Web Services managed templates. This parameter can't be used with custom job templates or to create jobs from them.
        public let documentParameters: [String: String]?
        /// An S3 link, or S3 object URL, to the job document. The link is an Amazon S3 object URL and is required if you don't specify a value for document. For example, --document-source https://s3.region-code.amazonaws.com/example-firmware/device-firmware.1.0  For more information, see Methods for accessing a bucket.
        public let documentSource: String?
        /// Allows you to create the criteria to retry a job.
        public let jobExecutionsRetryConfig: JobExecutionsRetryConfig?
        /// Allows you to create a staged rollout of the job.
        public let jobExecutionsRolloutConfig: JobExecutionsRolloutConfig?
        /// A job identifier which must be unique for your account. We recommend using a UUID. Alpha-numeric characters, "-" and "_" are valid for use here.
        public let jobId: String
        /// The ARN of the job template used to create the job.
        public let jobTemplateArn: String?
        /// The namespace used to indicate that a job is a customer-managed job. When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.  $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/   The namespaceId feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.
        public let namespaceId: String?
        /// Configuration information for pre-signed S3 URLs.
        public let presignedUrlConfig: PresignedUrlConfig?
        /// The configuration that allows you to schedule a job for a future date and time in addition to specifying the end behavior for each job execution.
        public let schedulingConfig: SchedulingConfig?
        /// Metadata which can be used to manage the job.
        public let tags: [Tag]?
        /// A list of things and thing groups to which the job should be sent.
        public let targets: [String]
        /// Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a thing when the thing is added to a target group, even after the job was completed by all things originally in the group.  We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.
        public let targetSelection: TargetSelection?
        /// Specifies the amount of time each device has to finish its execution of the job. The timer is started when the job execution status is set to IN_PROGRESS. If the job execution status is not set to another terminal state before the time expires, it will be automatically set to TIMED_OUT.
        public let timeoutConfig: TimeoutConfig?

        @inlinable
        public init(abortConfig: AbortConfig? = nil, description: String? = nil, destinationPackageVersions: [String]? = nil, document: String? = nil, documentParameters: [String: String]? = nil, documentSource: String? = nil, jobExecutionsRetryConfig: JobExecutionsRetryConfig? = nil, jobExecutionsRolloutConfig: JobExecutionsRolloutConfig? = nil, jobId: String, jobTemplateArn: String? = nil, namespaceId: String? = nil, presignedUrlConfig: PresignedUrlConfig? = nil, schedulingConfig: SchedulingConfig? = nil, tags: [Tag]? = nil, targets: [String], targetSelection: TargetSelection? = nil, timeoutConfig: TimeoutConfig? = nil) {
            self.abortConfig = abortConfig
            self.description = description
            self.destinationPackageVersions = destinationPackageVersions
            self.document = document
            self.documentParameters = documentParameters
            self.documentSource = documentSource
            self.jobExecutionsRetryConfig = jobExecutionsRetryConfig
            self.jobExecutionsRolloutConfig = jobExecutionsRolloutConfig
            self.jobId = jobId
            self.jobTemplateArn = jobTemplateArn
            self.namespaceId = namespaceId
            self.presignedUrlConfig = presignedUrlConfig
            self.schedulingConfig = schedulingConfig
            self.tags = tags
            self.targets = targets
            self.targetSelection = targetSelection
            self.timeoutConfig = timeoutConfig
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.abortConfig, forKey: .abortConfig)
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encodeIfPresent(self.destinationPackageVersions, forKey: .destinationPackageVersions)
            try container.encodeIfPresent(self.document, forKey: .document)
            try container.encodeIfPresent(self.documentParameters, forKey: .documentParameters)
            try container.encodeIfPresent(self.documentSource, forKey: .documentSource)
            try container.encodeIfPresent(self.jobExecutionsRetryConfig, forKey: .jobExecutionsRetryConfig)
            try container.encodeIfPresent(self.jobExecutionsRolloutConfig, forKey: .jobExecutionsRolloutConfig)
            request.encodePath(self.jobId, key: "jobId")
            try container.encodeIfPresent(self.jobTemplateArn, forKey: .jobTemplateArn)
            try container.encodeIfPresent(self.namespaceId, forKey: .namespaceId)
            try container.encodeIfPresent(self.presignedUrlConfig, forKey: .presignedUrlConfig)
            try container.encodeIfPresent(self.schedulingConfig, forKey: .schedulingConfig)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            try container.encode(self.targets, forKey: .targets)
            try container.encodeIfPresent(self.targetSelection, forKey: .targetSelection)
            try container.encodeIfPresent(self.timeoutConfig, forKey: .timeoutConfig)
        }

        public func validate(name: String) throws {
            try self.abortConfig?.validate(name: "\(name).abortConfig")
            try self.validate(self.description, name: "description", parent: name, max: 2028)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[^\\p{C}]+$")
            try self.destinationPackageVersions?.forEach {
                try validate($0, name: "destinationPackageVersions[]", parent: name, max: 1600)
                try validate($0, name: "destinationPackageVersions[]", parent: name, min: 1)
                try validate($0, name: "destinationPackageVersions[]", parent: name, pattern: "^arn:[!-~]+$")
            }
            try self.validate(self.document, name: "document", parent: name, max: 32768)
            try self.documentParameters?.forEach {
                try validate($0.key, name: "documentParameters.key", parent: name, max: 128)
                try validate($0.key, name: "documentParameters.key", parent: name, min: 1)
                try validate($0.key, name: "documentParameters.key", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
                try validate($0.value, name: "documentParameters[\"\($0.key)\"]", parent: name, max: 30720)
                try validate($0.value, name: "documentParameters[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "documentParameters[\"\($0.key)\"]", parent: name, pattern: "^[^\\p{C}]+$")
            }
            try self.validate(self.documentSource, name: "documentSource", parent: name, max: 1350)
            try self.validate(self.documentSource, name: "documentSource", parent: name, min: 1)
            try self.jobExecutionsRetryConfig?.validate(name: "\(name).jobExecutionsRetryConfig")
            try self.jobExecutionsRolloutConfig?.validate(name: "\(name).jobExecutionsRolloutConfig")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.jobTemplateArn, name: "jobTemplateArn", parent: name, max: 1600)
            try self.validate(self.jobTemplateArn, name: "jobTemplateArn", parent: name, min: 1)
            try self.validate(self.jobTemplateArn, name: "jobTemplateArn", parent: name, pattern: "^arn:[!-~]+$")
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.presignedUrlConfig?.validate(name: "\(name).presignedUrlConfig")
            try self.schedulingConfig?.validate(name: "\(name).schedulingConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.targets.forEach {
                try validate($0, name: "targets[]", parent: name, max: 2048)
            }
            try self.validate(self.targets, name: "targets", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case abortConfig = "abortConfig"
            case description = "description"
            case destinationPackageVersions = "destinationPackageVersions"
            case document = "document"
            case documentParameters = "documentParameters"
            case documentSource = "documentSource"
            case jobExecutionsRetryConfig = "jobExecutionsRetryConfig"
            case jobExecutionsRolloutConfig = "jobExecutionsRolloutConfig"
            case jobTemplateArn = "jobTemplateArn"
            case namespaceId = "namespaceId"
            case presignedUrlConfig = "presignedUrlConfig"
            case schedulingConfig = "schedulingConfig"
            case tags = "tags"
            case targets = "targets"
            case targetSelection = "targetSelection"
            case timeoutConfig = "timeoutConfig"
        }
    }

    public struct CreateJobResponse: AWSDecodableShape {
        /// The job description.
        public let description: String?
        /// The job ARN.
        public let jobArn: String?
        /// The unique identifier you assigned to this job.
        public let jobId: String?

        @inlinable
        public init(description: String? = nil, jobArn: String? = nil, jobId: String? = nil) {
            self.description = description
            self.jobArn = jobArn
            self.jobId = jobId
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case jobArn = "jobArn"
            case jobId = "jobId"
        }
    }

    public struct CreateJobTemplateRequest: AWSEncodableShape {
        public let abortConfig: AbortConfig?
        /// A description of the job document.
        public let description: String
        /// The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.  Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.
        public let destinationPackageVersions: [String]?
        /// The job document. Required if you don't specify a value for documentSource.
        public let document: String?
        /// An S3 link, or S3 object URL, to the job document. The link is an Amazon S3 object URL and is required if you don't specify a value for document. For example, --document-source https://s3.region-code.amazonaws.com/example-firmware/device-firmware.1.0  For more information, see Methods for accessing a bucket.
        public let documentSource: String?
        /// The ARN of the job to use as the basis for the job template.
        public let jobArn: String?
        /// Allows you to create the criteria to retry a job.
        public let jobExecutionsRetryConfig: JobExecutionsRetryConfig?
        public let jobExecutionsRolloutConfig: JobExecutionsRolloutConfig?
        /// A unique identifier for the job template. We recommend using a UUID. Alpha-numeric characters, "-", and "_" are valid for use here.
        public let jobTemplateId: String
        /// Allows you to configure an optional maintenance window for the rollout of a job document to all devices in the target group for a job.
        public let maintenanceWindows: [MaintenanceWindow]?
        public let presignedUrlConfig: PresignedUrlConfig?
        /// Metadata that can be used to manage the job template.
        public let tags: [Tag]?
        public let timeoutConfig: TimeoutConfig?

        @inlinable
        public init(abortConfig: AbortConfig? = nil, description: String, destinationPackageVersions: [String]? = nil, document: String? = nil, documentSource: String? = nil, jobArn: String? = nil, jobExecutionsRetryConfig: JobExecutionsRetryConfig? = nil, jobExecutionsRolloutConfig: JobExecutionsRolloutConfig? = nil, jobTemplateId: String, maintenanceWindows: [MaintenanceWindow]? = nil, presignedUrlConfig: PresignedUrlConfig? = nil, tags: [Tag]? = nil, timeoutConfig: TimeoutConfig? = nil) {
            self.abortConfig = abortConfig
            self.description = description
            self.destinationPackageVersions = destinationPackageVersions
            self.document = document
            self.documentSource = documentSource
            self.jobArn = jobArn
            self.jobExecutionsRetryConfig = jobExecutionsRetryConfig
            self.jobExecutionsRolloutConfig = jobExecutionsRolloutConfig
            self.jobTemplateId = jobTemplateId
            self.maintenanceWindows = maintenanceWindows
            self.presignedUrlConfig = presignedUrlConfig
            self.tags = tags
            self.timeoutConfig = timeoutConfig
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.abortConfig, forKey: .abortConfig)
            try container.encode(self.description, forKey: .description)
            try container.encodeIfPresent(self.destinationPackageVersions, forKey: .destinationPackageVersions)
            try container.encodeIfPresent(self.document, forKey: .document)
            try container.encodeIfPresent(self.documentSource, forKey: .documentSource)
            try container.encodeIfPresent(self.jobArn, forKey: .jobArn)
            try container.encodeIfPresent(self.jobExecutionsRetryConfig, forKey: .jobExecutionsRetryConfig)
            try container.encodeIfPresent(self.jobExecutionsRolloutConfig, forKey: .jobExecutionsRolloutConfig)
            request.encodePath(self.jobTemplateId, key: "jobTemplateId")
            try container.encodeIfPresent(self.maintenanceWindows, forKey: .maintenanceWindows)
            try container.encodeIfPresent(self.presignedUrlConfig, forKey: .presignedUrlConfig)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            try container.encodeIfPresent(self.timeoutConfig, forKey: .timeoutConfig)
        }

        public func validate(name: String) throws {
            try self.abortConfig?.validate(name: "\(name).abortConfig")
            try self.validate(self.description, name: "description", parent: name, max: 2028)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[^\\p{C}]+$")
            try self.destinationPackageVersions?.forEach {
                try validate($0, name: "destinationPackageVersions[]", parent: name, max: 1600)
                try validate($0, name: "destinationPackageVersions[]", parent: name, min: 1)
                try validate($0, name: "destinationPackageVersions[]", parent: name, pattern: "^arn:[!-~]+$")
            }
            try self.validate(self.document, name: "document", parent: name, max: 32768)
            try self.validate(self.documentSource, name: "documentSource", parent: name, max: 1350)
            try self.validate(self.documentSource, name: "documentSource", parent: name, min: 1)
            try self.jobExecutionsRetryConfig?.validate(name: "\(name).jobExecutionsRetryConfig")
            try self.jobExecutionsRolloutConfig?.validate(name: "\(name).jobExecutionsRolloutConfig")
            try self.validate(self.jobTemplateId, name: "jobTemplateId", parent: name, max: 64)
            try self.validate(self.jobTemplateId, name: "jobTemplateId", parent: name, min: 1)
            try self.validate(self.jobTemplateId, name: "jobTemplateId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.maintenanceWindows?.forEach {
                try $0.validate(name: "\(name).maintenanceWindows[]")
            }
            try self.presignedUrlConfig?.validate(name: "\(name).presignedUrlConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case abortConfig = "abortConfig"
            case description = "description"
            case destinationPackageVersions = "destinationPackageVersions"
            case document = "document"
            case documentSource = "documentSource"
            case jobArn = "jobArn"
            case jobExecutionsRetryConfig = "jobExecutionsRetryConfig"
            case jobExecutionsRolloutConfig = "jobExecutionsRolloutConfig"
            case maintenanceWindows = "maintenanceWindows"
            case presignedUrlConfig = "presignedUrlConfig"
            case tags = "tags"
            case timeoutConfig = "timeoutConfig"
        }
    }

    public struct CreateJobTemplateResponse: AWSDecodableShape {
        /// The ARN of the job template.
        public let jobTemplateArn: String?
        /// The unique identifier of the job template.
        public let jobTemplateId: String?

        @inlinable
        public init(jobTemplateArn: String? = nil, jobTemplateId: String? = nil) {
            self.jobTemplateArn = jobTemplateArn
            self.jobTemplateId = jobTemplateId
        }

        private enum CodingKeys: String, CodingKey {
            case jobTemplateArn = "jobTemplateArn"
            case jobTemplateId = "jobTemplateId"
        }
    }

    public struct CreateKeysAndCertificateRequest: AWSEncodableShape {
        /// Specifies whether the certificate is active.
        public let setAsActive: Bool?

        @inlinable
        public init(setAsActive: Bool? = nil) {
            self.setAsActive = setAsActive
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.setAsActive, key: "setAsActive")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct CreateKeysAndCertificateResponse: AWSDecodableShape {
        /// The ARN of the certificate.
        public let certificateArn: String?
        /// The ID of the certificate. IoT issues a default subject name for the certificate (for example, IoT Certificate).
        public let certificateId: String?
        /// The certificate data, in PEM format.
        public let certificatePem: String?
        /// The generated key pair.
        public let keyPair: KeyPair?

        @inlinable
        public init(certificateArn: String? = nil, certificateId: String? = nil, certificatePem: String? = nil, keyPair: KeyPair? = nil) {
            self.certificateArn = certificateArn
            self.certificateId = certificateId
            self.certificatePem = certificatePem
            self.keyPair = keyPair
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn = "certificateArn"
            case certificateId = "certificateId"
            case certificatePem = "certificatePem"
            case keyPair = "keyPair"
        }
    }

    public struct CreateMitigationActionRequest: AWSEncodableShape {
        /// A friendly name for the action. Choose a friendly name that accurately describes the action (for example, EnableLoggingAction).
        public let actionName: String
        /// Defines the type of action and the parameters for that action.
        public let actionParams: MitigationActionParams
        /// The ARN of the IAM role that is used to apply the mitigation action.
        public let roleArn: String
        /// Metadata that can be used to manage the mitigation action.
        public let tags: [Tag]?

        @inlinable
        public init(actionName: String, actionParams: MitigationActionParams, roleArn: String, tags: [Tag]? = nil) {
            self.actionName = actionName
            self.actionParams = actionParams
            self.roleArn = roleArn
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.actionName, key: "actionName")
            try container.encode(self.actionParams, forKey: .actionParams)
            try container.encode(self.roleArn, forKey: .roleArn)
            try container.encodeIfPresent(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.validate(self.actionName, name: "actionName", parent: name, max: 128)
            try self.validate(self.actionName, name: "actionName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.actionParams.validate(name: "\(name).actionParams")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case actionParams = "actionParams"
            case roleArn = "roleArn"
            case tags = "tags"
        }
    }

    public struct CreateMitigationActionResponse: AWSDecodableShape {
        /// The ARN for the new mitigation action.
        public let actionArn: String?
        /// A unique identifier for the new mitigation action.
        public let actionId: String?

        @inlinable
        public init(actionArn: String? = nil, actionId: String? = nil) {
            self.actionArn = actionArn
            self.actionId = actionId
        }

        private enum CodingKeys: String, CodingKey {
            case actionArn = "actionArn"
            case actionId = "actionId"
        }
    }

    public struct CreateOTAUpdateRequest: AWSEncodableShape {
        /// A list of additional OTA update parameters, which are name-value pairs.  They won't be sent to devices as a part of the Job document.
        public let additionalParameters: [String: String]?
        /// The criteria that determine when and how a job abort takes place.
        public let awsJobAbortConfig: AwsJobAbortConfig?
        /// Configuration for the rollout of OTA updates.
        public let awsJobExecutionsRolloutConfig: AwsJobExecutionsRolloutConfig?
        /// Configuration information for pre-signed URLs.
        public let awsJobPresignedUrlConfig: AwsJobPresignedUrlConfig?
        /// Specifies the amount of time each device has to finish its execution of the job.  A timer is  started when the job execution status is set to IN_PROGRESS. If the job execution  status is not set to another terminal state before the timer expires, it will be automatically  set to TIMED_OUT.
        public let awsJobTimeoutConfig: AwsJobTimeoutConfig?
        /// The description of the OTA update.
        public let description: String?
        /// The files to be streamed by the OTA update.
        public let files: [OTAUpdateFile]
        /// The ID of the OTA update to be created.
        public let otaUpdateId: String
        /// The protocol used to transfer the OTA update image. Valid values are [HTTP], [MQTT], [HTTP, MQTT]. When both HTTP and MQTT are specified, the target device can choose the protocol.
        public let protocols: [`Protocol`]?
        /// The IAM role that grants Amazon Web Services IoT Core access to the Amazon S3, IoT jobs and Amazon Web Services Code Signing resources  to create an OTA update job.
        public let roleArn: String
        /// Metadata which can be used to manage updates.
        public let tags: [Tag]?
        /// The devices targeted to receive OTA updates.
        public let targets: [String]
        /// Specifies whether the update will continue to run (CONTINUOUS), or will be complete after all the things specified as targets have completed the update (SNAPSHOT). If continuous, the update may also be run on a thing when a change is detected in a target. For example, an update will run on a thing when the thing is added to a target group, even after the update was completed by all things originally in the group. Valid values: CONTINUOUS | SNAPSHOT.
        public let targetSelection: TargetSelection?

        @inlinable
        public init(additionalParameters: [String: String]? = nil, awsJobAbortConfig: AwsJobAbortConfig? = nil, awsJobExecutionsRolloutConfig: AwsJobExecutionsRolloutConfig? = nil, awsJobPresignedUrlConfig: AwsJobPresignedUrlConfig? = nil, awsJobTimeoutConfig: AwsJobTimeoutConfig? = nil, description: String? = nil, files: [OTAUpdateFile], otaUpdateId: String, protocols: [`Protocol`]? = nil, roleArn: String, tags: [Tag]? = nil, targets: [String], targetSelection: TargetSelection? = nil) {
            self.additionalParameters = additionalParameters
            self.awsJobAbortConfig = awsJobAbortConfig
            self.awsJobExecutionsRolloutConfig = awsJobExecutionsRolloutConfig
            self.awsJobPresignedUrlConfig = awsJobPresignedUrlConfig
            self.awsJobTimeoutConfig = awsJobTimeoutConfig
            self.description = description
            self.files = files
            self.otaUpdateId = otaUpdateId
            self.protocols = protocols
            self.roleArn = roleArn
            self.tags = tags
            self.targets = targets
            self.targetSelection = targetSelection
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.additionalParameters, forKey: .additionalParameters)
            try container.encodeIfPresent(self.awsJobAbortConfig, forKey: .awsJobAbortConfig)
            try container.encodeIfPresent(self.awsJobExecutionsRolloutConfig, forKey: .awsJobExecutionsRolloutConfig)
            try container.encodeIfPresent(self.awsJobPresignedUrlConfig, forKey: .awsJobPresignedUrlConfig)
            try container.encodeIfPresent(self.awsJobTimeoutConfig, forKey: .awsJobTimeoutConfig)
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encode(self.files, forKey: .files)
            request.encodePath(self.otaUpdateId, key: "otaUpdateId")
            try container.encodeIfPresent(self.protocols, forKey: .protocols)
            try container.encode(self.roleArn, forKey: .roleArn)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            try container.encode(self.targets, forKey: .targets)
            try container.encodeIfPresent(self.targetSelection, forKey: .targetSelection)
        }

        public func validate(name: String) throws {
            try self.additionalParameters?.forEach {
                try validate($0.value, name: "additionalParameters[\"\($0.key)\"]", parent: name, max: 4096)
                try validate($0.value, name: "additionalParameters[\"\($0.key)\"]", parent: name, pattern: "^[\\s\\S]*$")
            }
            try self.awsJobAbortConfig?.validate(name: "\(name).awsJobAbortConfig")
            try self.awsJobExecutionsRolloutConfig?.validate(name: "\(name).awsJobExecutionsRolloutConfig")
            try self.validate(self.description, name: "description", parent: name, max: 2028)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[^\\p{C}]+$")
            try self.files.forEach {
                try $0.validate(name: "\(name).files[]")
            }
            try self.validate(self.files, name: "files", parent: name, min: 1)
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, max: 128)
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, min: 1)
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.protocols, name: "protocols", parent: name, max: 2)
            try self.validate(self.protocols, name: "protocols", parent: name, min: 1)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.targets, name: "targets", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case additionalParameters = "additionalParameters"
            case awsJobAbortConfig = "awsJobAbortConfig"
            case awsJobExecutionsRolloutConfig = "awsJobExecutionsRolloutConfig"
            case awsJobPresignedUrlConfig = "awsJobPresignedUrlConfig"
            case awsJobTimeoutConfig = "awsJobTimeoutConfig"
            case description = "description"
            case files = "files"
            case protocols = "protocols"
            case roleArn = "roleArn"
            case tags = "tags"
            case targets = "targets"
            case targetSelection = "targetSelection"
        }
    }

    public struct CreateOTAUpdateResponse: AWSDecodableShape {
        /// The IoT job ARN associated with the OTA update.
        public let awsIotJobArn: String?
        /// The IoT job ID associated with the OTA update.
        public let awsIotJobId: String?
        /// The OTA update ARN.
        public let otaUpdateArn: String?
        /// The OTA update ID.
        public let otaUpdateId: String?
        /// The OTA update status.
        public let otaUpdateStatus: OTAUpdateStatus?

        @inlinable
        public init(awsIotJobArn: String? = nil, awsIotJobId: String? = nil, otaUpdateArn: String? = nil, otaUpdateId: String? = nil, otaUpdateStatus: OTAUpdateStatus? = nil) {
            self.awsIotJobArn = awsIotJobArn
            self.awsIotJobId = awsIotJobId
            self.otaUpdateArn = otaUpdateArn
            self.otaUpdateId = otaUpdateId
            self.otaUpdateStatus = otaUpdateStatus
        }

        private enum CodingKeys: String, CodingKey {
            case awsIotJobArn = "awsIotJobArn"
            case awsIotJobId = "awsIotJobId"
            case otaUpdateArn = "otaUpdateArn"
            case otaUpdateId = "otaUpdateId"
            case otaUpdateStatus = "otaUpdateStatus"
        }
    }

    public struct CreatePackageRequest: AWSEncodableShape {
        /// A unique case-sensitive identifier that you can provide to ensure the idempotency of the request.  Don't reuse this client token if a new idempotent request is required.
        public let clientToken: String?
        /// A summary of the package being created. This can be used to outline the package's contents or purpose.
        public let description: String?
        /// The name of the new software package.
        public let packageName: String
        /// Metadata that can be used to manage the package.
        public let tags: [String: String]?

        @inlinable
        public init(clientToken: String? = CreatePackageRequest.idempotencyToken(), description: String? = nil, packageName: String, tags: [String: String]? = nil) {
            self.clientToken = clientToken
            self.description = description
            self.packageName = packageName
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.clientToken, key: "clientToken")
            try container.encodeIfPresent(self.description, forKey: .description)
            request.encodePath(self.packageName, key: "packageName")
            try container.encodeIfPresent(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 36)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^\\S{36,64}$")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[^\\p{C}]+$")
            try self.validate(self.packageName, name: "packageName", parent: name, max: 128)
            try self.validate(self.packageName, name: "packageName", parent: name, min: 1)
            try self.validate(self.packageName, name: "packageName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case tags = "tags"
        }
    }

    public struct CreatePackageResponse: AWSDecodableShape {
        /// The package description.
        public let description: String?
        /// The Amazon Resource Name (ARN) for the package.
        public let packageArn: String?
        /// The name of the software package.
        public let packageName: String?

        @inlinable
        public init(description: String? = nil, packageArn: String? = nil, packageName: String? = nil) {
            self.description = description
            self.packageArn = packageArn
            self.packageName = packageName
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case packageArn = "packageArn"
            case packageName = "packageName"
        }
    }

    public struct CreatePackageVersionRequest: AWSEncodableShape {
        /// The various build components created during the build process such as libraries and configuration files that make up a software package version.
        public let artifact: PackageVersionArtifact?
        /// Metadata that can be used to define a package version’s configuration. For example, the S3 file location, configuration options that are being sent to the device or fleet. The combined size of all the attributes on a package version is limited to 3KB.
        public let attributes: [String: String]?
        /// A unique case-sensitive identifier that you can provide to ensure the idempotency of the request.  Don't reuse this client token if a new idempotent request is required.
        public let clientToken: String?
        /// A summary of the package version being created. This can be used to outline the package's contents or purpose.
        public let description: String?
        /// The name of the associated software package.
        public let packageName: String
        /// The inline job document associated with a software package version used for a quick job deployment.
        public let recipe: String?
        /// Metadata that can be used to manage the package version.
        public let tags: [String: String]?
        /// The name of the new package version.
        public let versionName: String

        @inlinable
        public init(artifact: PackageVersionArtifact? = nil, attributes: [String: String]? = nil, clientToken: String? = CreatePackageVersionRequest.idempotencyToken(), description: String? = nil, packageName: String, recipe: String? = nil, tags: [String: String]? = nil, versionName: String) {
            self.artifact = artifact
            self.attributes = attributes
            self.clientToken = clientToken
            self.description = description
            self.packageName = packageName
            self.recipe = recipe
            self.tags = tags
            self.versionName = versionName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.artifact, forKey: .artifact)
            try container.encodeIfPresent(self.attributes, forKey: .attributes)
            request.encodeQuery(self.clientToken, key: "clientToken")
            try container.encodeIfPresent(self.description, forKey: .description)
            request.encodePath(self.packageName, key: "packageName")
            try container.encodeIfPresent(self.recipe, forKey: .recipe)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            request.encodePath(self.versionName, key: "versionName")
        }

        public func validate(name: String) throws {
            try self.artifact?.validate(name: "\(name).artifact")
            try self.attributes?.forEach {
                try validate($0.key, name: "attributes.key", parent: name, min: 1)
                try validate($0.key, name: "attributes.key", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, pattern: "^[^\\p{C}]+$")
            }
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 36)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^\\S{36,64}$")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[^\\p{C}]+$")
            try self.validate(self.packageName, name: "packageName", parent: name, max: 128)
            try self.validate(self.packageName, name: "packageName", parent: name, min: 1)
            try self.validate(self.packageName, name: "packageName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
            try self.validate(self.recipe, name: "recipe", parent: name, max: 3072)
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
            try self.validate(self.versionName, name: "versionName", parent: name, max: 64)
            try self.validate(self.versionName, name: "versionName", parent: name, min: 1)
            try self.validate(self.versionName, name: "versionName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case artifact = "artifact"
            case attributes = "attributes"
            case description = "description"
            case recipe = "recipe"
            case tags = "tags"
        }
    }

    public struct CreatePackageVersionResponse: AWSDecodableShape {
        /// Metadata that were added to the package version that can be used to define a package version’s configuration.
        public let attributes: [String: String]?
        /// The package version description.
        public let description: String?
        /// Error reason for a package version failure during creation or update.
        public let errorReason: String?
        /// The name of the associated software package.
        public let packageName: String?
        /// The Amazon Resource Name (ARN) for the package.
        public let packageVersionArn: String?
        /// The status of the package version. For more information, see Package version lifecycle.
        public let status: PackageVersionStatus?
        /// The name of the new package version.
        public let versionName: String?

        @inlinable
        public init(attributes: [String: String]? = nil, description: String? = nil, errorReason: String? = nil, packageName: String? = nil, packageVersionArn: String? = nil, status: PackageVersionStatus? = nil, versionName: String? = nil) {
            self.attributes = attributes
            self.description = description
            self.errorReason = errorReason
            self.packageName = packageName
            self.packageVersionArn = packageVersionArn
            self.status = status
            self.versionName = versionName
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "attributes"
            case description = "description"
            case errorReason = "errorReason"
            case packageName = "packageName"
            case packageVersionArn = "packageVersionArn"
            case status = "status"
            case versionName = "versionName"
        }
    }

    public struct CreatePolicyRequest: AWSEncodableShape {
        /// The JSON document that describes the policy. policyDocument must have a minimum length of 1, with a maximum length of 2048, excluding whitespace.
        public let policyDocument: String
        /// The policy name.
        public let policyName: String
        /// Metadata which can be used to manage the policy.  For URI Request parameters use format: ...key1=value1&key2=value2... For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
        public let tags: [Tag]?

        @inlinable
        public init(policyDocument: String, policyName: String, tags: [Tag]? = nil) {
            self.policyDocument = policyDocument
            self.policyName = policyName
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.policyDocument, forKey: .policyDocument)
            request.encodePath(self.policyName, key: "policyName")
            try container.encodeIfPresent(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.validate(self.policyDocument, name: "policyDocument", parent: name, max: 404600)
            try self.validate(self.policyDocument, name: "policyDocument", parent: name, pattern: "^[\\s\\S]*$")
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[\\w+=,.@-]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case policyDocument = "policyDocument"
            case tags = "tags"
        }
    }

    public struct CreatePolicyResponse: AWSDecodableShape {
        /// The policy ARN.
        public let policyArn: String?
        /// The JSON document that describes the policy.
        public let policyDocument: String?
        /// The policy name.
        public let policyName: String?
        /// The policy version ID.
        public let policyVersionId: String?

        @inlinable
        public init(policyArn: String? = nil, policyDocument: String? = nil, policyName: String? = nil, policyVersionId: String? = nil) {
            self.policyArn = policyArn
            self.policyDocument = policyDocument
            self.policyName = policyName
            self.policyVersionId = policyVersionId
        }

        private enum CodingKeys: String, CodingKey {
            case policyArn = "policyArn"
            case policyDocument = "policyDocument"
            case policyName = "policyName"
            case policyVersionId = "policyVersionId"
        }
    }

    public struct CreatePolicyVersionRequest: AWSEncodableShape {
        /// The JSON document that describes the policy. Minimum length of 1. Maximum length of 2048, excluding whitespace.
        public let policyDocument: String
        /// The policy name.
        public let policyName: String
        /// Specifies whether the policy version is set as the default. When this parameter is true, the new policy version becomes the operative version (that is, the version that is in effect for the certificates to which the policy is attached).
        public let setAsDefault: Bool?

        @inlinable
        public init(policyDocument: String, policyName: String, setAsDefault: Bool? = nil) {
            self.policyDocument = policyDocument
            self.policyName = policyName
            self.setAsDefault = setAsDefault
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.policyDocument, forKey: .policyDocument)
            request.encodePath(self.policyName, key: "policyName")
            request.encodeQuery(self.setAsDefault, key: "setAsDefault")
        }

        public func validate(name: String) throws {
            try self.validate(self.policyDocument, name: "policyDocument", parent: name, max: 404600)
            try self.validate(self.policyDocument, name: "policyDocument", parent: name, pattern: "^[\\s\\S]*$")
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[\\w+=,.@-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case policyDocument = "policyDocument"
        }
    }

    public struct CreatePolicyVersionResponse: AWSDecodableShape {
        /// Specifies whether the policy version is the default.
        public let isDefaultVersion: Bool?
        /// The policy ARN.
        public let policyArn: String?
        /// The JSON document that describes the policy.
        public let policyDocument: String?
        /// The policy version ID.
        public let policyVersionId: String?

        @inlinable
        public init(isDefaultVersion: Bool? = nil, policyArn: String? = nil, policyDocument: String? = nil, policyVersionId: String? = nil) {
            self.isDefaultVersion = isDefaultVersion
            self.policyArn = policyArn
            self.policyDocument = policyDocument
            self.policyVersionId = policyVersionId
        }

        private enum CodingKeys: String, CodingKey {
            case isDefaultVersion = "isDefaultVersion"
            case policyArn = "policyArn"
            case policyDocument = "policyDocument"
            case policyVersionId = "policyVersionId"
        }
    }

    public struct CreateProvisioningClaimRequest: AWSEncodableShape {
        /// The name of the provisioning template to use.
        public let templateName: String

        @inlinable
        public init(templateName: String) {
            self.templateName = templateName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.templateName, key: "templateName")
        }

        public func validate(name: String) throws {
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct CreateProvisioningClaimResponse: AWSDecodableShape {
        /// The ID of the certificate.
        public let certificateId: String?
        /// The provisioning claim certificate.
        public let certificatePem: String?
        /// The provisioning claim expiration time.
        public let expiration: Date?
        /// The provisioning claim key pair.
        public let keyPair: KeyPair?

        @inlinable
        public init(certificateId: String? = nil, certificatePem: String? = nil, expiration: Date? = nil, keyPair: KeyPair? = nil) {
            self.certificateId = certificateId
            self.certificatePem = certificatePem
            self.expiration = expiration
            self.keyPair = keyPair
        }

        private enum CodingKeys: String, CodingKey {
            case certificateId = "certificateId"
            case certificatePem = "certificatePem"
            case expiration = "expiration"
            case keyPair = "keyPair"
        }
    }

    public struct CreateProvisioningTemplateRequest: AWSEncodableShape {
        /// The description of the provisioning template.
        public let description: String?
        /// True to enable the provisioning template, otherwise false.
        public let enabled: Bool?
        /// Creates a pre-provisioning hook template. Only supports template of type FLEET_PROVISIONING. For more information about provisioning template types, see type.
        public let preProvisioningHook: ProvisioningHook?
        /// The role ARN for the role associated with the provisioning template. This IoT role grants permission to provision a device.
        public let provisioningRoleArn: String
        /// Metadata which can be used to manage the provisioning template.  For URI Request parameters use format: ...key1=value1&key2=value2... For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
        public let tags: [Tag]?
        /// The JSON formatted contents of the provisioning template.
        public let templateBody: String
        /// The name of the provisioning template.
        public let templateName: String
        /// The type you define in a provisioning template. You can create a template with only one type. You can't change the template type after its creation. The default value is FLEET_PROVISIONING. For more information about provisioning template, see: Provisioning template.
        public let type: TemplateType?

        @inlinable
        public init(description: String? = nil, enabled: Bool? = nil, preProvisioningHook: ProvisioningHook? = nil, provisioningRoleArn: String, tags: [Tag]? = nil, templateBody: String, templateName: String, type: TemplateType? = nil) {
            self.description = description
            self.enabled = enabled
            self.preProvisioningHook = preProvisioningHook
            self.provisioningRoleArn = provisioningRoleArn
            self.tags = tags
            self.templateBody = templateBody
            self.templateName = templateName
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 500)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[^\\p{C}]*$")
            try self.preProvisioningHook?.validate(name: "\(name).preProvisioningHook")
            try self.validate(self.provisioningRoleArn, name: "provisioningRoleArn", parent: name, max: 2048)
            try self.validate(self.provisioningRoleArn, name: "provisioningRoleArn", parent: name, min: 20)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.templateBody, name: "templateBody", parent: name, max: 10240)
            try self.validate(self.templateBody, name: "templateBody", parent: name, pattern: "^[\\s\\S]*$")
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case enabled = "enabled"
            case preProvisioningHook = "preProvisioningHook"
            case provisioningRoleArn = "provisioningRoleArn"
            case tags = "tags"
            case templateBody = "templateBody"
            case templateName = "templateName"
            case type = "type"
        }
    }

    public struct CreateProvisioningTemplateResponse: AWSDecodableShape {
        /// The default version of the provisioning template.
        public let defaultVersionId: Int?
        /// The ARN that identifies the provisioning template.
        public let templateArn: String?
        /// The name of the provisioning template.
        public let templateName: String?

        @inlinable
        public init(defaultVersionId: Int? = nil, templateArn: String? = nil, templateName: String? = nil) {
            self.defaultVersionId = defaultVersionId
            self.templateArn = templateArn
            self.templateName = templateName
        }

        private enum CodingKeys: String, CodingKey {
            case defaultVersionId = "defaultVersionId"
            case templateArn = "templateArn"
            case templateName = "templateName"
        }
    }

    public struct CreateProvisioningTemplateVersionRequest: AWSEncodableShape {
        /// Sets a fleet provision template version as the default version.
        public let setAsDefault: Bool?
        /// The JSON formatted contents of the provisioning template.
        public let templateBody: String
        /// The name of the provisioning template.
        public let templateName: String

        @inlinable
        public init(setAsDefault: Bool? = nil, templateBody: String, templateName: String) {
            self.setAsDefault = setAsDefault
            self.templateBody = templateBody
            self.templateName = templateName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.setAsDefault, key: "setAsDefault")
            try container.encode(self.templateBody, forKey: .templateBody)
            request.encodePath(self.templateName, key: "templateName")
        }

        public func validate(name: String) throws {
            try self.validate(self.templateBody, name: "templateBody", parent: name, max: 10240)
            try self.validate(self.templateBody, name: "templateBody", parent: name, pattern: "^[\\s\\S]*$")
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case templateBody = "templateBody"
        }
    }

    public struct CreateProvisioningTemplateVersionResponse: AWSDecodableShape {
        /// True if the provisioning template version is the default version, otherwise false.
        public let isDefaultVersion: Bool?
        /// The ARN that identifies the provisioning template.
        public let templateArn: String?
        /// The name of the provisioning template.
        public let templateName: String?
        /// The version of the provisioning template.
        public let versionId: Int?

        @inlinable
        public init(isDefaultVersion: Bool? = nil, templateArn: String? = nil, templateName: String? = nil, versionId: Int? = nil) {
            self.isDefaultVersion = isDefaultVersion
            self.templateArn = templateArn
            self.templateName = templateName
            self.versionId = versionId
        }

        private enum CodingKeys: String, CodingKey {
            case isDefaultVersion = "isDefaultVersion"
            case templateArn = "templateArn"
            case templateName = "templateName"
            case versionId = "versionId"
        }
    }

    public struct CreateRoleAliasRequest: AWSEncodableShape {
        /// How long (in seconds) the credentials will be valid. The default value is 3,600 seconds. This value must be less than or equal to the maximum session duration of the IAM role that the role alias references.
        public let credentialDurationSeconds: Int?
        /// The role alias that points to a role ARN. This allows you to change the role without having to update the device.
        public let roleAlias: String
        /// The role ARN.
        public let roleArn: String
        /// Metadata which can be used to manage the role alias.  For URI Request parameters use format: ...key1=value1&key2=value2... For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
        public let tags: [Tag]?

        @inlinable
        public init(credentialDurationSeconds: Int? = nil, roleAlias: String, roleArn: String, tags: [Tag]? = nil) {
            self.credentialDurationSeconds = credentialDurationSeconds
            self.roleAlias = roleAlias
            self.roleArn = roleArn
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.credentialDurationSeconds, forKey: .credentialDurationSeconds)
            request.encodePath(self.roleAlias, key: "roleAlias")
            try container.encode(self.roleArn, forKey: .roleArn)
            try container.encodeIfPresent(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.validate(self.credentialDurationSeconds, name: "credentialDurationSeconds", parent: name, max: 43200)
            try self.validate(self.credentialDurationSeconds, name: "credentialDurationSeconds", parent: name, min: 900)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, max: 128)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, min: 1)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, pattern: "^[\\w=,@-]+$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case credentialDurationSeconds = "credentialDurationSeconds"
            case roleArn = "roleArn"
            case tags = "tags"
        }
    }

    public struct CreateRoleAliasResponse: AWSDecodableShape {
        /// The role alias.
        public let roleAlias: String?
        /// The role alias ARN.
        public let roleAliasArn: String?

        @inlinable
        public init(roleAlias: String? = nil, roleAliasArn: String? = nil) {
            self.roleAlias = roleAlias
            self.roleAliasArn = roleAliasArn
        }

        private enum CodingKeys: String, CodingKey {
            case roleAlias = "roleAlias"
            case roleAliasArn = "roleAliasArn"
        }
    }

    public struct CreateScheduledAuditRequest: AWSEncodableShape {
        /// The day of the month on which the scheduled audit takes place. This can be "1" through "31" or "LAST". This field is required if the "frequency" parameter is set to MONTHLY. If days 29 to 31 are specified, and the month doesn't have that many days, the audit takes place on the LAST day of the month.
        public let dayOfMonth: String?
        /// The day of the week on which the scheduled audit takes place, either SUN, MON, TUE, WED, THU, FRI, or SAT. This field is required if the frequency parameter is set to WEEKLY or BIWEEKLY.
        public let dayOfWeek: DayOfWeek?
        /// How often the scheduled audit takes place, either DAILY, WEEKLY, BIWEEKLY or MONTHLY. The start time of each audit is determined by the system.
        public let frequency: AuditFrequency
        /// The name you want to give to the scheduled audit. (Max. 128 chars)
        public let scheduledAuditName: String
        /// Metadata that can be used to manage the scheduled audit.
        public let tags: [Tag]?
        /// Which checks are performed during the scheduled audit. Checks must be enabled  for your account. (Use DescribeAccountAuditConfiguration to see the list of all checks, including those that are enabled or use UpdateAccountAuditConfiguration  to select which checks are enabled.)
        public let targetCheckNames: [String]

        @inlinable
        public init(dayOfMonth: String? = nil, dayOfWeek: DayOfWeek? = nil, frequency: AuditFrequency, scheduledAuditName: String, tags: [Tag]? = nil, targetCheckNames: [String]) {
            self.dayOfMonth = dayOfMonth
            self.dayOfWeek = dayOfWeek
            self.frequency = frequency
            self.scheduledAuditName = scheduledAuditName
            self.tags = tags
            self.targetCheckNames = targetCheckNames
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.dayOfMonth, forKey: .dayOfMonth)
            try container.encodeIfPresent(self.dayOfWeek, forKey: .dayOfWeek)
            try container.encode(self.frequency, forKey: .frequency)
            request.encodePath(self.scheduledAuditName, key: "scheduledAuditName")
            try container.encodeIfPresent(self.tags, forKey: .tags)
            try container.encode(self.targetCheckNames, forKey: .targetCheckNames)
        }

        public func validate(name: String) throws {
            try self.validate(self.dayOfMonth, name: "dayOfMonth", parent: name, pattern: "^([1-9]|[12][0-9]|3[01])$|^LAST$")
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, max: 128)
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, min: 1)
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case dayOfMonth = "dayOfMonth"
            case dayOfWeek = "dayOfWeek"
            case frequency = "frequency"
            case tags = "tags"
            case targetCheckNames = "targetCheckNames"
        }
    }

    public struct CreateScheduledAuditResponse: AWSDecodableShape {
        /// The ARN of the scheduled audit.
        public let scheduledAuditArn: String?

        @inlinable
        public init(scheduledAuditArn: String? = nil) {
            self.scheduledAuditArn = scheduledAuditArn
        }

        private enum CodingKeys: String, CodingKey {
            case scheduledAuditArn = "scheduledAuditArn"
        }
    }

    public struct CreateSecurityProfileRequest: AWSEncodableShape {
        ///  Please use CreateSecurityProfileRequest$additionalMetricsToRetainV2 instead.  A list of metrics whose data is retained (stored). By default, data is retained  for any metric used in the profile's behaviors, but it is also retained for  any metric specified here. Can be used with custom metrics; cannot be used with dimensions.
        public let additionalMetricsToRetain: [String]?
        /// A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's behaviors, but it is also retained for any metric specified here. Can be used with custom metrics; cannot be used with dimensions.
        public let additionalMetricsToRetainV2: [MetricToRetain]?
        /// Specifies the destinations to which alerts are sent. (Alerts are always sent to the  console.) Alerts are generated when a device (thing) violates a behavior.
        public let alertTargets: [AlertTargetType: AlertTarget]?
        /// Specifies the behaviors that, when violated by a device (thing), cause an alert.
        public let behaviors: [Behavior]?
        /// Specifies the MQTT topic and role ARN required for metric export.
        public let metricsExportConfig: MetricsExportConfig?
        /// A description of the security profile.
        public let securityProfileDescription: String?
        /// The name you are giving to the security profile.
        public let securityProfileName: String
        /// Metadata that can be used to manage the security profile.
        public let tags: [Tag]?

        @inlinable
        public init(additionalMetricsToRetainV2: [MetricToRetain]? = nil, alertTargets: [AlertTargetType: AlertTarget]? = nil, behaviors: [Behavior]? = nil, metricsExportConfig: MetricsExportConfig? = nil, securityProfileDescription: String? = nil, securityProfileName: String, tags: [Tag]? = nil) {
            self.additionalMetricsToRetain = nil
            self.additionalMetricsToRetainV2 = additionalMetricsToRetainV2
            self.alertTargets = alertTargets
            self.behaviors = behaviors
            self.metricsExportConfig = metricsExportConfig
            self.securityProfileDescription = securityProfileDescription
            self.securityProfileName = securityProfileName
            self.tags = tags
        }

        @available(*, deprecated, message: "Members additionalMetricsToRetain have been deprecated")
        @inlinable
        public init(additionalMetricsToRetain: [String]? = nil, additionalMetricsToRetainV2: [MetricToRetain]? = nil, alertTargets: [AlertTargetType: AlertTarget]? = nil, behaviors: [Behavior]? = nil, metricsExportConfig: MetricsExportConfig? = nil, securityProfileDescription: String? = nil, securityProfileName: String, tags: [Tag]? = nil) {
            self.additionalMetricsToRetain = additionalMetricsToRetain
            self.additionalMetricsToRetainV2 = additionalMetricsToRetainV2
            self.alertTargets = alertTargets
            self.behaviors = behaviors
            self.metricsExportConfig = metricsExportConfig
            self.securityProfileDescription = securityProfileDescription
            self.securityProfileName = securityProfileName
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.additionalMetricsToRetain, forKey: .additionalMetricsToRetain)
            try container.encodeIfPresent(self.additionalMetricsToRetainV2, forKey: .additionalMetricsToRetainV2)
            try container.encodeIfPresent(self.alertTargets, forKey: .alertTargets)
            try container.encodeIfPresent(self.behaviors, forKey: .behaviors)
            try container.encodeIfPresent(self.metricsExportConfig, forKey: .metricsExportConfig)
            try container.encodeIfPresent(self.securityProfileDescription, forKey: .securityProfileDescription)
            request.encodePath(self.securityProfileName, key: "securityProfileName")
            try container.encodeIfPresent(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.additionalMetricsToRetainV2?.forEach {
                try $0.validate(name: "\(name).additionalMetricsToRetainV2[]")
            }
            try self.alertTargets?.forEach {
                try $0.value.validate(name: "\(name).alertTargets[\"\($0.key)\"]")
            }
            try self.behaviors?.forEach {
                try $0.validate(name: "\(name).behaviors[]")
            }
            try self.validate(self.behaviors, name: "behaviors", parent: name, max: 100)
            try self.metricsExportConfig?.validate(name: "\(name).metricsExportConfig")
            try self.validate(self.securityProfileDescription, name: "securityProfileDescription", parent: name, max: 1000)
            try self.validate(self.securityProfileDescription, name: "securityProfileDescription", parent: name, pattern: "^[\\p{Graph}\\x20]*$")
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case additionalMetricsToRetain = "additionalMetricsToRetain"
            case additionalMetricsToRetainV2 = "additionalMetricsToRetainV2"
            case alertTargets = "alertTargets"
            case behaviors = "behaviors"
            case metricsExportConfig = "metricsExportConfig"
            case securityProfileDescription = "securityProfileDescription"
            case tags = "tags"
        }
    }

    public struct CreateSecurityProfileResponse: AWSDecodableShape {
        /// The ARN of the security profile.
        public let securityProfileArn: String?
        /// The name you gave to the security profile.
        public let securityProfileName: String?

        @inlinable
        public init(securityProfileArn: String? = nil, securityProfileName: String? = nil) {
            self.securityProfileArn = securityProfileArn
            self.securityProfileName = securityProfileName
        }

        private enum CodingKeys: String, CodingKey {
            case securityProfileArn = "securityProfileArn"
            case securityProfileName = "securityProfileName"
        }
    }

    public struct CreateStreamRequest: AWSEncodableShape {
        /// A description of the stream.
        public let description: String?
        /// The files to stream.
        public let files: [StreamFile]
        /// An IAM role that allows the IoT service principal to access your S3 files.
        public let roleArn: String
        /// The stream ID.
        public let streamId: String
        /// Metadata which can be used to manage streams.
        public let tags: [Tag]?

        @inlinable
        public init(description: String? = nil, files: [StreamFile], roleArn: String, streamId: String, tags: [Tag]? = nil) {
            self.description = description
            self.files = files
            self.roleArn = roleArn
            self.streamId = streamId
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encode(self.files, forKey: .files)
            try container.encode(self.roleArn, forKey: .roleArn)
            request.encodePath(self.streamId, key: "streamId")
            try container.encodeIfPresent(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 2028)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[^\\p{C}]+$")
            try self.files.forEach {
                try $0.validate(name: "\(name).files[]")
            }
            try self.validate(self.files, name: "files", parent: name, max: 50)
            try self.validate(self.files, name: "files", parent: name, min: 1)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.streamId, name: "streamId", parent: name, max: 128)
            try self.validate(self.streamId, name: "streamId", parent: name, min: 1)
            try self.validate(self.streamId, name: "streamId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case files = "files"
            case roleArn = "roleArn"
            case tags = "tags"
        }
    }

    public struct CreateStreamResponse: AWSDecodableShape {
        /// A description of the stream.
        public let description: String?
        /// The stream ARN.
        public let streamArn: String?
        /// The stream ID.
        public let streamId: String?
        /// The version of the stream.
        public let streamVersion: Int?

        @inlinable
        public init(description: String? = nil, streamArn: String? = nil, streamId: String? = nil, streamVersion: Int? = nil) {
            self.description = description
            self.streamArn = streamArn
            self.streamId = streamId
            self.streamVersion = streamVersion
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case streamArn = "streamArn"
            case streamId = "streamId"
            case streamVersion = "streamVersion"
        }
    }

    public struct CreateThingGroupRequest: AWSEncodableShape {
        /// The name of the parent thing group.
        public let parentGroupName: String?
        /// Metadata which can be used to manage the thing group.
        public let tags: [Tag]?
        /// The thing group name to create.
        public let thingGroupName: String
        /// The thing group properties.
        public let thingGroupProperties: ThingGroupProperties?

        @inlinable
        public init(parentGroupName: String? = nil, tags: [Tag]? = nil, thingGroupName: String, thingGroupProperties: ThingGroupProperties? = nil) {
            self.parentGroupName = parentGroupName
            self.tags = tags
            self.thingGroupName = thingGroupName
            self.thingGroupProperties = thingGroupProperties
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.parentGroupName, forKey: .parentGroupName)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            request.encodePath(self.thingGroupName, key: "thingGroupName")
            try container.encodeIfPresent(self.thingGroupProperties, forKey: .thingGroupProperties)
        }

        public func validate(name: String) throws {
            try self.validate(self.parentGroupName, name: "parentGroupName", parent: name, max: 128)
            try self.validate(self.parentGroupName, name: "parentGroupName", parent: name, min: 1)
            try self.validate(self.parentGroupName, name: "parentGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.thingGroupProperties?.validate(name: "\(name).thingGroupProperties")
        }

        private enum CodingKeys: String, CodingKey {
            case parentGroupName = "parentGroupName"
            case tags = "tags"
            case thingGroupProperties = "thingGroupProperties"
        }
    }

    public struct CreateThingGroupResponse: AWSDecodableShape {
        /// The thing group ARN.
        public let thingGroupArn: String?
        /// The thing group ID.
        public let thingGroupId: String?
        /// The thing group name.
        public let thingGroupName: String?

        @inlinable
        public init(thingGroupArn: String? = nil, thingGroupId: String? = nil, thingGroupName: String? = nil) {
            self.thingGroupArn = thingGroupArn
            self.thingGroupId = thingGroupId
            self.thingGroupName = thingGroupName
        }

        private enum CodingKeys: String, CodingKey {
            case thingGroupArn = "thingGroupArn"
            case thingGroupId = "thingGroupId"
            case thingGroupName = "thingGroupName"
        }
    }

    public struct CreateThingRequest: AWSEncodableShape {
        /// The attribute payload, which consists of up to three name/value pairs in a JSON
        /// 			document. For example:  {\"attributes\":{\"string1\":\"string2\"}}
        public let attributePayload: AttributePayload?
        /// The name of the billing group the thing will be added to.
        public let billingGroupName: String?
        /// The name of the thing to create. You can't change a thing's name after you create it. To change a thing's name, you must create a
        /// 			new thing, give it the new name, and then delete the old thing.
        public let thingName: String
        /// The name of the thing type associated with the new thing.
        public let thingTypeName: String?

        @inlinable
        public init(attributePayload: AttributePayload? = nil, billingGroupName: String? = nil, thingName: String, thingTypeName: String? = nil) {
            self.attributePayload = attributePayload
            self.billingGroupName = billingGroupName
            self.thingName = thingName
            self.thingTypeName = thingTypeName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.attributePayload, forKey: .attributePayload)
            try container.encodeIfPresent(self.billingGroupName, forKey: .billingGroupName)
            request.encodePath(self.thingName, key: "thingName")
            try container.encodeIfPresent(self.thingTypeName, forKey: .thingTypeName)
        }

        public func validate(name: String) throws {
            try self.attributePayload?.validate(name: "\(name).attributePayload")
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, max: 128)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, min: 1)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, max: 128)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributePayload = "attributePayload"
            case billingGroupName = "billingGroupName"
            case thingTypeName = "thingTypeName"
        }
    }

    public struct CreateThingResponse: AWSDecodableShape {
        /// The ARN of the new thing.
        public let thingArn: String?
        /// The thing ID.
        public let thingId: String?
        /// The name of the new thing.
        public let thingName: String?

        @inlinable
        public init(thingArn: String? = nil, thingId: String? = nil, thingName: String? = nil) {
            self.thingArn = thingArn
            self.thingId = thingId
            self.thingName = thingName
        }

        private enum CodingKeys: String, CodingKey {
            case thingArn = "thingArn"
            case thingId = "thingId"
            case thingName = "thingName"
        }
    }

    public struct CreateThingTypeRequest: AWSEncodableShape {
        /// Metadata which can be used to manage the thing type.
        public let tags: [Tag]?
        /// The name of the thing type.
        public let thingTypeName: String
        /// The ThingTypeProperties for the thing type to create. It contains information about
        /// 			the new thing type including a description, and a list of searchable thing attribute
        /// 			names.
        public let thingTypeProperties: ThingTypeProperties?

        @inlinable
        public init(tags: [Tag]? = nil, thingTypeName: String, thingTypeProperties: ThingTypeProperties? = nil) {
            self.tags = tags
            self.thingTypeName = thingTypeName
            self.thingTypeProperties = thingTypeProperties
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            request.encodePath(self.thingTypeName, key: "thingTypeName")
            try container.encodeIfPresent(self.thingTypeProperties, forKey: .thingTypeProperties)
        }

        public func validate(name: String) throws {
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, max: 128)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.thingTypeProperties?.validate(name: "\(name).thingTypeProperties")
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "tags"
            case thingTypeProperties = "thingTypeProperties"
        }
    }

    public struct CreateThingTypeResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the thing type.
        public let thingTypeArn: String?
        /// The thing type ID.
        public let thingTypeId: String?
        /// The name of the thing type.
        public let thingTypeName: String?

        @inlinable
        public init(thingTypeArn: String? = nil, thingTypeId: String? = nil, thingTypeName: String? = nil) {
            self.thingTypeArn = thingTypeArn
            self.thingTypeId = thingTypeId
            self.thingTypeName = thingTypeName
        }

        private enum CodingKeys: String, CodingKey {
            case thingTypeArn = "thingTypeArn"
            case thingTypeId = "thingTypeId"
            case thingTypeName = "thingTypeName"
        }
    }

    public struct CreateTopicRuleDestinationRequest: AWSEncodableShape {
        /// The topic rule destination configuration.
        public let destinationConfiguration: TopicRuleDestinationConfiguration

        @inlinable
        public init(destinationConfiguration: TopicRuleDestinationConfiguration) {
            self.destinationConfiguration = destinationConfiguration
        }

        public func validate(name: String) throws {
            try self.destinationConfiguration.validate(name: "\(name).destinationConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case destinationConfiguration = "destinationConfiguration"
        }
    }

    public struct CreateTopicRuleDestinationResponse: AWSDecodableShape {
        /// The topic rule destination.
        public let topicRuleDestination: TopicRuleDestination?

        @inlinable
        public init(topicRuleDestination: TopicRuleDestination? = nil) {
            self.topicRuleDestination = topicRuleDestination
        }

        private enum CodingKeys: String, CodingKey {
            case topicRuleDestination = "topicRuleDestination"
        }
    }

    public struct CreateTopicRuleRequest: AWSEncodableShape {
        /// The name of the rule.
        public let ruleName: String
        /// Metadata which can be used to manage the topic rule.  For URI Request parameters use format: ...key1=value1&key2=value2... For the CLI command-line parameter use format: --tags "key1=value1&key2=value2..." For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
        public let tags: String?
        /// The rule payload.
        public let topicRulePayload: TopicRulePayload

        @inlinable
        public init(ruleName: String, tags: String? = nil, topicRulePayload: TopicRulePayload) {
            self.ruleName = ruleName
            self.tags = tags
            self.topicRulePayload = topicRulePayload
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.singleValueContainer()
            request.encodePath(self.ruleName, key: "ruleName")
            request.encodeHeader(self.tags, key: "x-amz-tagging")
            try container.encode(self.topicRulePayload)
        }

        public func validate(name: String) throws {
            try self.validate(self.ruleName, name: "ruleName", parent: name, max: 128)
            try self.validate(self.ruleName, name: "ruleName", parent: name, min: 1)
            try self.validate(self.ruleName, name: "ruleName", parent: name, pattern: "^[a-zA-Z0-9_]+$")
            try self.topicRulePayload.validate(name: "\(name).topicRulePayload")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct CustomCodeSigning: AWSEncodableShape & AWSDecodableShape {
        /// The certificate chain.
        public let certificateChain: CodeSigningCertificateChain?
        /// The hash algorithm used to code sign the file. You can use a string as the algorithm name if the target over-the-air (OTA) update devices are able to verify the signature that was generated using the same signature algorithm. For example, FreeRTOS uses SHA256 or SHA1, so you can pass either of them based on which was used for generating the signature.
        public let hashAlgorithm: String?
        /// The signature for the file.
        public let signature: CodeSigningSignature?
        /// The signature algorithm used to code sign the file. You can use a string as the algorithm name if the target over-the-air (OTA) update devices are able to verify the signature that was generated using the same signature algorithm. For example, FreeRTOS uses ECDSA or RSA, so you can pass either of them based on which was used for generating the signature.
        public let signatureAlgorithm: String?

        @inlinable
        public init(certificateChain: CodeSigningCertificateChain? = nil, hashAlgorithm: String? = nil, signature: CodeSigningSignature? = nil, signatureAlgorithm: String? = nil) {
            self.certificateChain = certificateChain
            self.hashAlgorithm = hashAlgorithm
            self.signature = signature
            self.signatureAlgorithm = signatureAlgorithm
        }

        private enum CodingKeys: String, CodingKey {
            case certificateChain = "certificateChain"
            case hashAlgorithm = "hashAlgorithm"
            case signature = "signature"
            case signatureAlgorithm = "signatureAlgorithm"
        }
    }

    public struct DeleteAccountAuditConfigurationRequest: AWSEncodableShape {
        /// If true, all scheduled audits are deleted.
        public let deleteScheduledAudits: Bool?

        @inlinable
        public init(deleteScheduledAudits: Bool? = nil) {
            self.deleteScheduledAudits = deleteScheduledAudits
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.deleteScheduledAudits, key: "deleteScheduledAudits")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteAccountAuditConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteAuditSuppressionRequest: AWSEncodableShape {
        public let checkName: String
        public let resourceIdentifier: ResourceIdentifier

        @inlinable
        public init(checkName: String, resourceIdentifier: ResourceIdentifier) {
            self.checkName = checkName
            self.resourceIdentifier = resourceIdentifier
        }

        public func validate(name: String) throws {
            try self.resourceIdentifier.validate(name: "\(name).resourceIdentifier")
        }

        private enum CodingKeys: String, CodingKey {
            case checkName = "checkName"
            case resourceIdentifier = "resourceIdentifier"
        }
    }

    public struct DeleteAuditSuppressionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteAuthorizerRequest: AWSEncodableShape {
        /// The name of the authorizer to delete.
        public let authorizerName: String

        @inlinable
        public init(authorizerName: String) {
            self.authorizerName = authorizerName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.authorizerName, key: "authorizerName")
        }

        public func validate(name: String) throws {
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, max: 128)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, min: 1)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, pattern: "^[\\w=,@-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteAuthorizerResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteBillingGroupRequest: AWSEncodableShape {
        /// The name of the billing group.
        public let billingGroupName: String
        /// The expected version of the billing group. If the version of the billing group does
        /// 			not match the expected version specified in the request, the
        /// 				DeleteBillingGroup request is rejected with a
        /// 				VersionConflictException.
        public let expectedVersion: Int64?

        @inlinable
        public init(billingGroupName: String, expectedVersion: Int64? = nil) {
            self.billingGroupName = billingGroupName
            self.expectedVersion = expectedVersion
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.billingGroupName, key: "billingGroupName")
            request.encodeQuery(self.expectedVersion, key: "expectedVersion")
        }

        public func validate(name: String) throws {
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, max: 128)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, min: 1)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteBillingGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteCACertificateRequest: AWSEncodableShape {
        /// The ID of the certificate to delete. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String

        @inlinable
        public init(certificateId: String) {
            self.certificateId = certificateId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.certificateId, key: "certificateId")
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "^(0x)?[a-fA-F0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteCACertificateResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteCertificateProviderRequest: AWSEncodableShape {
        /// The name of the certificate provider.
        public let certificateProviderName: String

        @inlinable
        public init(certificateProviderName: String) {
            self.certificateProviderName = certificateProviderName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.certificateProviderName, key: "certificateProviderName")
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateProviderName, name: "certificateProviderName", parent: name, max: 128)
            try self.validate(self.certificateProviderName, name: "certificateProviderName", parent: name, min: 1)
            try self.validate(self.certificateProviderName, name: "certificateProviderName", parent: name, pattern: "^[\\w=,@-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteCertificateProviderResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteCertificateRequest: AWSEncodableShape {
        /// The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String
        /// Forces the deletion of a certificate if it is inactive and is not attached to an IoT thing.
        public let forceDelete: Bool?

        @inlinable
        public init(certificateId: String, forceDelete: Bool? = nil) {
            self.certificateId = certificateId
            self.forceDelete = forceDelete
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.certificateId, key: "certificateId")
            request.encodeQuery(self.forceDelete, key: "forceDelete")
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "^(0x)?[a-fA-F0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteCommandExecutionRequest: AWSEncodableShape {
        /// The unique identifier of the command execution that you want to delete from your account.
        public let executionId: String
        /// The Amazon Resource Number (ARN) of the target device for which you want to delete command executions.
        public let targetArn: String

        @inlinable
        public init(executionId: String, targetArn: String) {
            self.executionId = executionId
            self.targetArn = targetArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.executionId, key: "executionId")
            request.encodeQuery(self.targetArn, key: "targetArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.executionId, name: "executionId", parent: name, max: 64)
            try self.validate(self.executionId, name: "executionId", parent: name, min: 1)
            try self.validate(self.executionId, name: "executionId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.targetArn, name: "targetArn", parent: name, max: 2048)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteCommandExecutionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteCommandRequest: AWSEncodableShape {
        /// The unique identifier of the command to be deleted.
        public let commandId: String

        @inlinable
        public init(commandId: String) {
            self.commandId = commandId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.commandId, key: "commandId")
        }

        public func validate(name: String) throws {
            try self.validate(self.commandId, name: "commandId", parent: name, max: 64)
            try self.validate(self.commandId, name: "commandId", parent: name, min: 1)
            try self.validate(self.commandId, name: "commandId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteCommandResponse: AWSDecodableShape {
        /// The status code for the command deletion request. The status code is in the 200 range for a successful request.   If the command hasn't been deprecated, or has been deprecated for a duration that  is shorter than the maximum time out duration of 12 hours, when calling the DeleteCommand request, the deletion will be scheduled and a 202 status code will be returned. While the command is being deleted, it will be in a  pendingDeletion state. Once the time out duration has been reached, the command will be permanently removed from your account.   If the command has been deprecated for a duration that is longer than the  maximum time out duration of 12 hours, when calling the DeleteCommand request, the command will be deleted immediately and a 204 status code will be returned.
        public let statusCode: Int?

        @inlinable
        public init(statusCode: Int? = nil) {
            self.statusCode = statusCode
        }

        public init(from decoder: Decoder) throws {
            let response = decoder.userInfo[.awsResponse]! as! ResponseDecodingContainer
            self.statusCode = response.decodeStatus()
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteCustomMetricRequest: AWSEncodableShape {
        ///  The name of the custom metric.
        public let metricName: String

        @inlinable
        public init(metricName: String) {
            self.metricName = metricName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.metricName, key: "metricName")
        }

        public func validate(name: String) throws {
            try self.validate(self.metricName, name: "metricName", parent: name, max: 128)
            try self.validate(self.metricName, name: "metricName", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteCustomMetricResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteDimensionRequest: AWSEncodableShape {
        /// The unique identifier for the dimension that you want to delete.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.name, key: "name")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteDimensionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteDomainConfigurationRequest: AWSEncodableShape {
        /// The name of the domain configuration to be deleted.
        public let domainConfigurationName: String

        @inlinable
        public init(domainConfigurationName: String) {
            self.domainConfigurationName = domainConfigurationName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.domainConfigurationName, key: "domainConfigurationName")
        }

        public func validate(name: String) throws {
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, max: 128)
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, min: 1)
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, pattern: "^[\\w.-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteDomainConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteDynamicThingGroupRequest: AWSEncodableShape {
        /// The expected version of the dynamic thing group to delete.
        public let expectedVersion: Int64?
        /// The name of the dynamic thing group to delete.
        public let thingGroupName: String

        @inlinable
        public init(expectedVersion: Int64? = nil, thingGroupName: String) {
            self.expectedVersion = expectedVersion
            self.thingGroupName = thingGroupName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.expectedVersion, key: "expectedVersion")
            request.encodePath(self.thingGroupName, key: "thingGroupName")
        }

        public func validate(name: String) throws {
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteDynamicThingGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteFleetMetricRequest: AWSEncodableShape {
        /// The expected version of the fleet metric to delete.
        public let expectedVersion: Int64?
        /// The name of the fleet metric to delete.
        public let metricName: String

        @inlinable
        public init(expectedVersion: Int64? = nil, metricName: String) {
            self.expectedVersion = expectedVersion
            self.metricName = metricName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.expectedVersion, key: "expectedVersion")
            request.encodePath(self.metricName, key: "metricName")
        }

        public func validate(name: String) throws {
            try self.validate(self.metricName, name: "metricName", parent: name, max: 128)
            try self.validate(self.metricName, name: "metricName", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "^[a-zA-Z0-9_\\-\\.]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteJobExecutionRequest: AWSEncodableShape {
        /// The ID of the job execution to be deleted. The executionNumber refers to the execution of a particular job on a particular device. Note that once a job execution is deleted, the executionNumber may be reused by IoT, so be sure you get and use the correct value here.
        public let executionNumber: Int64
        /// (Optional) When true, you can delete a job execution which is "IN_PROGRESS". Otherwise, you can only delete a job execution which is in a terminal state ("SUCCEEDED", "FAILED", "REJECTED", "REMOVED" or "CANCELED") or an exception will occur. The default is false.  Deleting a job execution which is "IN_PROGRESS", will cause the device to be unable to access job information or update the job execution status. Use caution and ensure that the device is able to recover to a valid state.
        public let force: Bool?
        /// The ID of the job whose execution on a particular device will be deleted.
        public let jobId: String
        /// The namespace used to indicate that a job is a customer-managed job. When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.  $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/   The namespaceId feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.
        public let namespaceId: String?
        /// The name of the thing whose job execution will be deleted.
        public let thingName: String

        @inlinable
        public init(executionNumber: Int64, force: Bool? = nil, jobId: String, namespaceId: String? = nil, thingName: String) {
            self.executionNumber = executionNumber
            self.force = force
            self.jobId = jobId
            self.namespaceId = namespaceId
            self.thingName = thingName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.executionNumber, key: "executionNumber")
            request.encodeQuery(self.force, key: "force")
            request.encodePath(self.jobId, key: "jobId")
            request.encodeQuery(self.namespaceId, key: "namespaceId")
            request.encodePath(self.thingName, key: "thingName")
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteJobRequest: AWSEncodableShape {
        /// (Optional) When true, you can delete a job which is "IN_PROGRESS". Otherwise, you can only delete a job which is in a terminal state ("COMPLETED" or "CANCELED") or an exception will occur. The default is false.  Deleting a job which is "IN_PROGRESS", will cause a device which is executing the job to be unable to access job information or update the job execution status. Use caution and ensure that each device executing a job which is deleted is able to recover to a valid state.
        public let force: Bool?
        /// The ID of the job to be deleted. After a job deletion is completed, you may reuse this jobId when you create a new job. However, this is not recommended, and you must ensure that your devices are not using the jobId to refer to the deleted job.
        public let jobId: String
        /// The namespace used to indicate that a job is a customer-managed job. When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.  $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/   The namespaceId feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.
        public let namespaceId: String?

        @inlinable
        public init(force: Bool? = nil, jobId: String, namespaceId: String? = nil) {
            self.force = force
            self.jobId = jobId
            self.namespaceId = namespaceId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.force, key: "force")
            request.encodePath(self.jobId, key: "jobId")
            request.encodeQuery(self.namespaceId, key: "namespaceId")
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteJobTemplateRequest: AWSEncodableShape {
        /// The unique identifier of the job template to delete.
        public let jobTemplateId: String

        @inlinable
        public init(jobTemplateId: String) {
            self.jobTemplateId = jobTemplateId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.jobTemplateId, key: "jobTemplateId")
        }

        public func validate(name: String) throws {
            try self.validate(self.jobTemplateId, name: "jobTemplateId", parent: name, max: 64)
            try self.validate(self.jobTemplateId, name: "jobTemplateId", parent: name, min: 1)
            try self.validate(self.jobTemplateId, name: "jobTemplateId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteMitigationActionRequest: AWSEncodableShape {
        /// The name of the mitigation action that you want to delete.
        public let actionName: String

        @inlinable
        public init(actionName: String) {
            self.actionName = actionName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.actionName, key: "actionName")
        }

        public func validate(name: String) throws {
            try self.validate(self.actionName, name: "actionName", parent: name, max: 128)
            try self.validate(self.actionName, name: "actionName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteMitigationActionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteOTAUpdateRequest: AWSEncodableShape {
        /// When true, the stream created by the OTAUpdate process is deleted when the OTA update is deleted. Ignored if the stream specified in the OTAUpdate is supplied by the user.
        public let deleteStream: Bool?
        /// When true, deletes the IoT job created by the OTAUpdate process even if it is "IN_PROGRESS". Otherwise, if the  job is not in a terminal state ("COMPLETED" or "CANCELED") an exception will occur. The default is false.
        public let forceDeleteAWSJob: Bool?
        /// The ID of the OTA update to delete.
        public let otaUpdateId: String

        @inlinable
        public init(deleteStream: Bool? = nil, forceDeleteAWSJob: Bool? = nil, otaUpdateId: String) {
            self.deleteStream = deleteStream
            self.forceDeleteAWSJob = forceDeleteAWSJob
            self.otaUpdateId = otaUpdateId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.deleteStream, key: "deleteStream")
            request.encodeQuery(self.forceDeleteAWSJob, key: "forceDeleteAWSJob")
            request.encodePath(self.otaUpdateId, key: "otaUpdateId")
        }

        public func validate(name: String) throws {
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, max: 128)
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, min: 1)
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteOTAUpdateResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeletePackageRequest: AWSEncodableShape {
        /// A unique case-sensitive identifier that you can provide to ensure the idempotency of the request.  Don't reuse this client token if a new idempotent request is required.
        public let clientToken: String?
        /// The name of the target software package.
        public let packageName: String

        @inlinable
        public init(clientToken: String? = DeletePackageRequest.idempotencyToken(), packageName: String) {
            self.clientToken = clientToken
            self.packageName = packageName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.clientToken, key: "clientToken")
            request.encodePath(self.packageName, key: "packageName")
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 36)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^\\S{36,64}$")
            try self.validate(self.packageName, name: "packageName", parent: name, max: 128)
            try self.validate(self.packageName, name: "packageName", parent: name, min: 1)
            try self.validate(self.packageName, name: "packageName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeletePackageResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeletePackageVersionRequest: AWSEncodableShape {
        /// A unique case-sensitive identifier that you can provide to ensure the idempotency of the request.  Don't reuse this client token if a new idempotent request is required.
        public let clientToken: String?
        /// The name of the associated software package.
        public let packageName: String
        /// The name of the target package version.
        public let versionName: String

        @inlinable
        public init(clientToken: String? = DeletePackageVersionRequest.idempotencyToken(), packageName: String, versionName: String) {
            self.clientToken = clientToken
            self.packageName = packageName
            self.versionName = versionName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.clientToken, key: "clientToken")
            request.encodePath(self.packageName, key: "packageName")
            request.encodePath(self.versionName, key: "versionName")
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 36)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^\\S{36,64}$")
            try self.validate(self.packageName, name: "packageName", parent: name, max: 128)
            try self.validate(self.packageName, name: "packageName", parent: name, min: 1)
            try self.validate(self.packageName, name: "packageName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
            try self.validate(self.versionName, name: "versionName", parent: name, max: 64)
            try self.validate(self.versionName, name: "versionName", parent: name, min: 1)
            try self.validate(self.versionName, name: "versionName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeletePackageVersionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeletePolicyRequest: AWSEncodableShape {
        /// The name of the policy to delete.
        public let policyName: String

        @inlinable
        public init(policyName: String) {
            self.policyName = policyName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.policyName, key: "policyName")
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[\\w+=,.@-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeletePolicyVersionRequest: AWSEncodableShape {
        /// The name of the policy.
        public let policyName: String
        /// The policy version ID.
        public let policyVersionId: String

        @inlinable
        public init(policyName: String, policyVersionId: String) {
            self.policyName = policyName
            self.policyVersionId = policyVersionId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.policyName, key: "policyName")
            request.encodePath(self.policyVersionId, key: "policyVersionId")
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[\\w+=,.@-]+$")
            try self.validate(self.policyVersionId, name: "policyVersionId", parent: name, pattern: "^[0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteProvisioningTemplateRequest: AWSEncodableShape {
        /// The name of the fleet provision template to delete.
        public let templateName: String

        @inlinable
        public init(templateName: String) {
            self.templateName = templateName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.templateName, key: "templateName")
        }

        public func validate(name: String) throws {
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteProvisioningTemplateResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteProvisioningTemplateVersionRequest: AWSEncodableShape {
        /// The name of the provisioning template version to delete.
        public let templateName: String
        /// The provisioning template version ID to delete.
        public let versionId: Int

        @inlinable
        public init(templateName: String, versionId: Int) {
            self.templateName = templateName
            self.versionId = versionId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.templateName, key: "templateName")
            request.encodePath(self.versionId, key: "versionId")
        }

        public func validate(name: String) throws {
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteProvisioningTemplateVersionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteRegistrationCodeRequest: AWSEncodableShape {
        public init() {}
    }

    public struct DeleteRegistrationCodeResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteRoleAliasRequest: AWSEncodableShape {
        /// The role alias to delete.
        public let roleAlias: String

        @inlinable
        public init(roleAlias: String) {
            self.roleAlias = roleAlias
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.roleAlias, key: "roleAlias")
        }

        public func validate(name: String) throws {
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, max: 128)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, min: 1)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, pattern: "^[\\w=,@-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteRoleAliasResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteScheduledAuditRequest: AWSEncodableShape {
        /// The name of the scheduled audit you want to delete.
        public let scheduledAuditName: String

        @inlinable
        public init(scheduledAuditName: String) {
            self.scheduledAuditName = scheduledAuditName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.scheduledAuditName, key: "scheduledAuditName")
        }

        public func validate(name: String) throws {
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, max: 128)
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, min: 1)
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteScheduledAuditResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteSecurityProfileRequest: AWSEncodableShape {
        /// The expected version of the security profile. A new version is generated whenever the security profile is updated. If you specify a value that is different from the actual version, a VersionConflictException is thrown.
        public let expectedVersion: Int64?
        /// The name of the security profile to be deleted.
        public let securityProfileName: String

        @inlinable
        public init(expectedVersion: Int64? = nil, securityProfileName: String) {
            self.expectedVersion = expectedVersion
            self.securityProfileName = securityProfileName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.expectedVersion, key: "expectedVersion")
            request.encodePath(self.securityProfileName, key: "securityProfileName")
        }

        public func validate(name: String) throws {
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteSecurityProfileResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteStreamRequest: AWSEncodableShape {
        /// The stream ID.
        public let streamId: String

        @inlinable
        public init(streamId: String) {
            self.streamId = streamId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.streamId, key: "streamId")
        }

        public func validate(name: String) throws {
            try self.validate(self.streamId, name: "streamId", parent: name, max: 128)
            try self.validate(self.streamId, name: "streamId", parent: name, min: 1)
            try self.validate(self.streamId, name: "streamId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteStreamResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteThingGroupRequest: AWSEncodableShape {
        /// The expected version of the thing group to delete.
        public let expectedVersion: Int64?
        /// The name of the thing group to delete.
        public let thingGroupName: String

        @inlinable
        public init(expectedVersion: Int64? = nil, thingGroupName: String) {
            self.expectedVersion = expectedVersion
            self.thingGroupName = thingGroupName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.expectedVersion, key: "expectedVersion")
            request.encodePath(self.thingGroupName, key: "thingGroupName")
        }

        public func validate(name: String) throws {
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteThingGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteThingRequest: AWSEncodableShape {
        /// The expected version of the thing record in the registry. If the version of the
        /// 			record in the registry does not match the expected version specified in the request, the
        /// 				DeleteThing request is rejected with a
        /// 				VersionConflictException.
        public let expectedVersion: Int64?
        /// The name of the thing to delete.
        public let thingName: String

        @inlinable
        public init(expectedVersion: Int64? = nil, thingName: String) {
            self.expectedVersion = expectedVersion
            self.thingName = thingName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.expectedVersion, key: "expectedVersion")
            request.encodePath(self.thingName, key: "thingName")
        }

        public func validate(name: String) throws {
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteThingResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteThingTypeRequest: AWSEncodableShape {
        /// The name of the thing type.
        public let thingTypeName: String

        @inlinable
        public init(thingTypeName: String) {
            self.thingTypeName = thingTypeName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.thingTypeName, key: "thingTypeName")
        }

        public func validate(name: String) throws {
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, max: 128)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteThingTypeResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteTopicRuleDestinationRequest: AWSEncodableShape {
        /// The ARN of the topic rule destination to delete.
        public let arn: String

        @inlinable
        public init(arn: String) {
            self.arn = arn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.arn, key: "arn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteTopicRuleDestinationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteTopicRuleRequest: AWSEncodableShape {
        /// The name of the rule.
        public let ruleName: String

        @inlinable
        public init(ruleName: String) {
            self.ruleName = ruleName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.ruleName, key: "ruleName")
        }

        public func validate(name: String) throws {
            try self.validate(self.ruleName, name: "ruleName", parent: name, max: 128)
            try self.validate(self.ruleName, name: "ruleName", parent: name, min: 1)
            try self.validate(self.ruleName, name: "ruleName", parent: name, pattern: "^[a-zA-Z0-9_]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteV2LoggingLevelRequest: AWSEncodableShape {
        /// The name of the resource for which you are configuring logging.
        public let targetName: String
        /// The type of resource for which you are configuring logging. Must be THING_Group.
        public let targetType: LogTargetType

        @inlinable
        public init(targetName: String, targetType: LogTargetType) {
            self.targetName = targetName
            self.targetType = targetType
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.targetName, key: "targetName")
            request.encodeQuery(self.targetType, key: "targetType")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct Denied: AWSDecodableShape {
        /// Information that explicitly denies the authorization.
        public let explicitDeny: ExplicitDeny?
        /// Information that implicitly denies the authorization. When a policy doesn't explicitly deny or allow an action on a resource it is considered an implicit deny.
        public let implicitDeny: ImplicitDeny?

        @inlinable
        public init(explicitDeny: ExplicitDeny? = nil, implicitDeny: ImplicitDeny? = nil) {
            self.explicitDeny = explicitDeny
            self.implicitDeny = implicitDeny
        }

        private enum CodingKeys: String, CodingKey {
            case explicitDeny = "explicitDeny"
            case implicitDeny = "implicitDeny"
        }
    }

    public struct DeprecateThingTypeRequest: AWSEncodableShape {
        /// The name of the thing type to deprecate.
        public let thingTypeName: String
        /// Whether to undeprecate a deprecated thing type. If true, the thing type will not be deprecated anymore and you can
        /// 			associate it with things.
        public let undoDeprecate: Bool?

        @inlinable
        public init(thingTypeName: String, undoDeprecate: Bool? = nil) {
            self.thingTypeName = thingTypeName
            self.undoDeprecate = undoDeprecate
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.thingTypeName, key: "thingTypeName")
            try container.encodeIfPresent(self.undoDeprecate, forKey: .undoDeprecate)
        }

        public func validate(name: String) throws {
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, max: 128)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case undoDeprecate = "undoDeprecate"
        }
    }

    public struct DeprecateThingTypeResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeAccountAuditConfigurationRequest: AWSEncodableShape {
        public init() {}
    }

    public struct DescribeAccountAuditConfigurationResponse: AWSDecodableShape {
        /// Which audit checks are enabled and disabled for this account.
        public let auditCheckConfigurations: [String: AuditCheckConfiguration]?
        /// Information about the targets to which audit notifications are sent for  this account.
        public let auditNotificationTargetConfigurations: [AuditNotificationType: AuditNotificationTarget]?
        /// The ARN of the role that grants permission to IoT to access information about your devices, policies, certificates, and other items as required when  performing an audit. On the first call to UpdateAccountAuditConfiguration, this parameter is required.
        public let roleArn: String?

        @inlinable
        public init(auditCheckConfigurations: [String: AuditCheckConfiguration]? = nil, auditNotificationTargetConfigurations: [AuditNotificationType: AuditNotificationTarget]? = nil, roleArn: String? = nil) {
            self.auditCheckConfigurations = auditCheckConfigurations
            self.auditNotificationTargetConfigurations = auditNotificationTargetConfigurations
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case auditCheckConfigurations = "auditCheckConfigurations"
            case auditNotificationTargetConfigurations = "auditNotificationTargetConfigurations"
            case roleArn = "roleArn"
        }
    }

    public struct DescribeAuditFindingRequest: AWSEncodableShape {
        /// A unique identifier for a single audit finding. You can use this identifier to apply mitigation actions to the finding.
        public let findingId: String

        @inlinable
        public init(findingId: String) {
            self.findingId = findingId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.findingId, key: "findingId")
        }

        public func validate(name: String) throws {
            try self.validate(self.findingId, name: "findingId", parent: name, max: 128)
            try self.validate(self.findingId, name: "findingId", parent: name, min: 1)
            try self.validate(self.findingId, name: "findingId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeAuditFindingResponse: AWSDecodableShape {
        public let finding: AuditFinding?

        @inlinable
        public init(finding: AuditFinding? = nil) {
            self.finding = finding
        }

        private enum CodingKeys: String, CodingKey {
            case finding = "finding"
        }
    }

    public struct DescribeAuditMitigationActionsTaskRequest: AWSEncodableShape {
        /// The unique identifier for the audit mitigation task.
        public let taskId: String

        @inlinable
        public init(taskId: String) {
            self.taskId = taskId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.taskId, key: "taskId")
        }

        public func validate(name: String) throws {
            try self.validate(self.taskId, name: "taskId", parent: name, max: 128)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeAuditMitigationActionsTaskResponse: AWSDecodableShape {
        /// Specifies the mitigation actions and their parameters that are applied as part of this task.
        public let actionsDefinition: [MitigationAction]?
        /// Specifies the mitigation actions that should be applied to specific audit checks.
        public let auditCheckToActionsMapping: [String: [String]]?
        /// The date and time when the task was completed or canceled.
        public let endTime: Date?
        /// The date and time when the task was started.
        public let startTime: Date?
        /// Identifies the findings to which the mitigation actions are applied. This can be by audit checks, by audit task, or a set of findings.
        public let target: AuditMitigationActionsTaskTarget?
        /// Aggregate counts of the results when the mitigation tasks were applied to the findings for this audit mitigation actions task.
        public let taskStatistics: [String: TaskStatisticsForAuditCheck]?
        /// The current status of the task.
        public let taskStatus: AuditMitigationActionsTaskStatus?

        @inlinable
        public init(actionsDefinition: [MitigationAction]? = nil, auditCheckToActionsMapping: [String: [String]]? = nil, endTime: Date? = nil, startTime: Date? = nil, target: AuditMitigationActionsTaskTarget? = nil, taskStatistics: [String: TaskStatisticsForAuditCheck]? = nil, taskStatus: AuditMitigationActionsTaskStatus? = nil) {
            self.actionsDefinition = actionsDefinition
            self.auditCheckToActionsMapping = auditCheckToActionsMapping
            self.endTime = endTime
            self.startTime = startTime
            self.target = target
            self.taskStatistics = taskStatistics
            self.taskStatus = taskStatus
        }

        private enum CodingKeys: String, CodingKey {
            case actionsDefinition = "actionsDefinition"
            case auditCheckToActionsMapping = "auditCheckToActionsMapping"
            case endTime = "endTime"
            case startTime = "startTime"
            case target = "target"
            case taskStatistics = "taskStatistics"
            case taskStatus = "taskStatus"
        }
    }

    public struct DescribeAuditSuppressionRequest: AWSEncodableShape {
        public let checkName: String
        public let resourceIdentifier: ResourceIdentifier

        @inlinable
        public init(checkName: String, resourceIdentifier: ResourceIdentifier) {
            self.checkName = checkName
            self.resourceIdentifier = resourceIdentifier
        }

        public func validate(name: String) throws {
            try self.resourceIdentifier.validate(name: "\(name).resourceIdentifier")
        }

        private enum CodingKeys: String, CodingKey {
            case checkName = "checkName"
            case resourceIdentifier = "resourceIdentifier"
        }
    }

    public struct DescribeAuditSuppressionResponse: AWSDecodableShape {
        public let checkName: String?
        ///  The description of the audit suppression.
        public let description: String?
        ///  The epoch timestamp in seconds at which this suppression expires.
        public let expirationDate: Date?
        public let resourceIdentifier: ResourceIdentifier?
        ///  Indicates whether a suppression should exist indefinitely or not.
        public let suppressIndefinitely: Bool?

        @inlinable
        public init(checkName: String? = nil, description: String? = nil, expirationDate: Date? = nil, resourceIdentifier: ResourceIdentifier? = nil, suppressIndefinitely: Bool? = nil) {
            self.checkName = checkName
            self.description = description
            self.expirationDate = expirationDate
            self.resourceIdentifier = resourceIdentifier
            self.suppressIndefinitely = suppressIndefinitely
        }

        private enum CodingKeys: String, CodingKey {
            case checkName = "checkName"
            case description = "description"
            case expirationDate = "expirationDate"
            case resourceIdentifier = "resourceIdentifier"
            case suppressIndefinitely = "suppressIndefinitely"
        }
    }

    public struct DescribeAuditTaskRequest: AWSEncodableShape {
        /// The ID of the audit whose information you want to get.
        public let taskId: String

        @inlinable
        public init(taskId: String) {
            self.taskId = taskId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.taskId, key: "taskId")
        }

        public func validate(name: String) throws {
            try self.validate(self.taskId, name: "taskId", parent: name, max: 40)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "^[a-zA-Z0-9\\-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeAuditTaskResponse: AWSDecodableShape {
        /// Detailed information about each check performed during this audit.
        public let auditDetails: [String: AuditCheckDetails]?
        /// The name of the scheduled audit (only if the audit was a scheduled audit).
        public let scheduledAuditName: String?
        /// The time the audit started.
        public let taskStartTime: Date?
        /// Statistical information about the audit.
        public let taskStatistics: TaskStatistics?
        /// The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED".
        public let taskStatus: AuditTaskStatus?
        /// The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK".
        public let taskType: AuditTaskType?

        @inlinable
        public init(auditDetails: [String: AuditCheckDetails]? = nil, scheduledAuditName: String? = nil, taskStartTime: Date? = nil, taskStatistics: TaskStatistics? = nil, taskStatus: AuditTaskStatus? = nil, taskType: AuditTaskType? = nil) {
            self.auditDetails = auditDetails
            self.scheduledAuditName = scheduledAuditName
            self.taskStartTime = taskStartTime
            self.taskStatistics = taskStatistics
            self.taskStatus = taskStatus
            self.taskType = taskType
        }

        private enum CodingKeys: String, CodingKey {
            case auditDetails = "auditDetails"
            case scheduledAuditName = "scheduledAuditName"
            case taskStartTime = "taskStartTime"
            case taskStatistics = "taskStatistics"
            case taskStatus = "taskStatus"
            case taskType = "taskType"
        }
    }

    public struct DescribeAuthorizerRequest: AWSEncodableShape {
        /// The name of the authorizer to describe.
        public let authorizerName: String

        @inlinable
        public init(authorizerName: String) {
            self.authorizerName = authorizerName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.authorizerName, key: "authorizerName")
        }

        public func validate(name: String) throws {
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, max: 128)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, min: 1)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, pattern: "^[\\w=,@-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeAuthorizerResponse: AWSDecodableShape {
        /// The authorizer description.
        public let authorizerDescription: AuthorizerDescription?

        @inlinable
        public init(authorizerDescription: AuthorizerDescription? = nil) {
            self.authorizerDescription = authorizerDescription
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerDescription = "authorizerDescription"
        }
    }

    public struct DescribeBillingGroupRequest: AWSEncodableShape {
        /// The name of the billing group.
        public let billingGroupName: String

        @inlinable
        public init(billingGroupName: String) {
            self.billingGroupName = billingGroupName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.billingGroupName, key: "billingGroupName")
        }

        public func validate(name: String) throws {
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, max: 128)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, min: 1)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeBillingGroupResponse: AWSDecodableShape {
        /// The ARN of the billing group.
        public let billingGroupArn: String?
        /// The ID of the billing group.
        public let billingGroupId: String?
        /// Additional information about the billing group.
        public let billingGroupMetadata: BillingGroupMetadata?
        /// The name of the billing group.
        public let billingGroupName: String?
        /// The properties of the billing group.
        public let billingGroupProperties: BillingGroupProperties?
        /// The version of the billing group.
        public let version: Int64?

        @inlinable
        public init(billingGroupArn: String? = nil, billingGroupId: String? = nil, billingGroupMetadata: BillingGroupMetadata? = nil, billingGroupName: String? = nil, billingGroupProperties: BillingGroupProperties? = nil, version: Int64? = nil) {
            self.billingGroupArn = billingGroupArn
            self.billingGroupId = billingGroupId
            self.billingGroupMetadata = billingGroupMetadata
            self.billingGroupName = billingGroupName
            self.billingGroupProperties = billingGroupProperties
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case billingGroupArn = "billingGroupArn"
            case billingGroupId = "billingGroupId"
            case billingGroupMetadata = "billingGroupMetadata"
            case billingGroupName = "billingGroupName"
            case billingGroupProperties = "billingGroupProperties"
            case version = "version"
        }
    }

    public struct DescribeCACertificateRequest: AWSEncodableShape {
        /// The CA certificate identifier.
        public let certificateId: String

        @inlinable
        public init(certificateId: String) {
            self.certificateId = certificateId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.certificateId, key: "certificateId")
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "^(0x)?[a-fA-F0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeCACertificateResponse: AWSDecodableShape {
        /// The CA certificate description.
        public let certificateDescription: CACertificateDescription?
        /// Information about the registration configuration.
        public let registrationConfig: RegistrationConfig?

        @inlinable
        public init(certificateDescription: CACertificateDescription? = nil, registrationConfig: RegistrationConfig? = nil) {
            self.certificateDescription = certificateDescription
            self.registrationConfig = registrationConfig
        }

        private enum CodingKeys: String, CodingKey {
            case certificateDescription = "certificateDescription"
            case registrationConfig = "registrationConfig"
        }
    }

    public struct DescribeCertificateProviderRequest: AWSEncodableShape {
        /// The name of the certificate provider.
        public let certificateProviderName: String

        @inlinable
        public init(certificateProviderName: String) {
            self.certificateProviderName = certificateProviderName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.certificateProviderName, key: "certificateProviderName")
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateProviderName, name: "certificateProviderName", parent: name, max: 128)
            try self.validate(self.certificateProviderName, name: "certificateProviderName", parent: name, min: 1)
            try self.validate(self.certificateProviderName, name: "certificateProviderName", parent: name, pattern: "^[\\w=,@-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeCertificateProviderResponse: AWSDecodableShape {
        /// A list of the operations that the certificate provider will use to generate certificates.  Valid value: CreateCertificateFromCsr.
        public let accountDefaultForOperations: [CertificateProviderOperation]?
        /// The ARN of the certificate provider.
        public let certificateProviderArn: String?
        /// The name of the certificate provider.
        public let certificateProviderName: String?
        /// The date-time string that indicates when the certificate provider was created.
        public let creationDate: Date?
        /// The Lambda function ARN that's associated with the certificate provider.
        public let lambdaFunctionArn: String?
        /// The date-time string that indicates when the certificate provider was last updated.
        public let lastModifiedDate: Date?

        @inlinable
        public init(accountDefaultForOperations: [CertificateProviderOperation]? = nil, certificateProviderArn: String? = nil, certificateProviderName: String? = nil, creationDate: Date? = nil, lambdaFunctionArn: String? = nil, lastModifiedDate: Date? = nil) {
            self.accountDefaultForOperations = accountDefaultForOperations
            self.certificateProviderArn = certificateProviderArn
            self.certificateProviderName = certificateProviderName
            self.creationDate = creationDate
            self.lambdaFunctionArn = lambdaFunctionArn
            self.lastModifiedDate = lastModifiedDate
        }

        private enum CodingKeys: String, CodingKey {
            case accountDefaultForOperations = "accountDefaultForOperations"
            case certificateProviderArn = "certificateProviderArn"
            case certificateProviderName = "certificateProviderName"
            case creationDate = "creationDate"
            case lambdaFunctionArn = "lambdaFunctionArn"
            case lastModifiedDate = "lastModifiedDate"
        }
    }

    public struct DescribeCertificateRequest: AWSEncodableShape {
        /// The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String

        @inlinable
        public init(certificateId: String) {
            self.certificateId = certificateId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.certificateId, key: "certificateId")
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "^(0x)?[a-fA-F0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeCertificateResponse: AWSDecodableShape {
        /// The description of the certificate.
        public let certificateDescription: CertificateDescription?

        @inlinable
        public init(certificateDescription: CertificateDescription? = nil) {
            self.certificateDescription = certificateDescription
        }

        private enum CodingKeys: String, CodingKey {
            case certificateDescription = "certificateDescription"
        }
    }

    public struct DescribeCustomMetricRequest: AWSEncodableShape {
        ///  The name of the custom metric.
        public let metricName: String

        @inlinable
        public init(metricName: String) {
            self.metricName = metricName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.metricName, key: "metricName")
        }

        public func validate(name: String) throws {
            try self.validate(self.metricName, name: "metricName", parent: name, max: 128)
            try self.validate(self.metricName, name: "metricName", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeCustomMetricResponse: AWSDecodableShape {
        ///  The creation date of the custom metric in milliseconds since epoch.
        public let creationDate: Date?
        ///  Field represents a friendly name in the console for the custom metric; doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated.
        public let displayName: String?
        ///  The time the custom metric was last modified in milliseconds since epoch.
        public let lastModifiedDate: Date?
        ///  The Amazon Resource Number (ARN) of the custom metric.
        public let metricArn: String?
        ///  The name of the custom metric.
        public let metricName: String?
        ///  The type of the custom metric.   The type number only takes a single metric value as an input, but while submitting the metrics value in the DeviceMetrics report, it must be passed as an array with a single value.
        public let metricType: CustomMetricType?

        @inlinable
        public init(creationDate: Date? = nil, displayName: String? = nil, lastModifiedDate: Date? = nil, metricArn: String? = nil, metricName: String? = nil, metricType: CustomMetricType? = nil) {
            self.creationDate = creationDate
            self.displayName = displayName
            self.lastModifiedDate = lastModifiedDate
            self.metricArn = metricArn
            self.metricName = metricName
            self.metricType = metricType
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
            case displayName = "displayName"
            case lastModifiedDate = "lastModifiedDate"
            case metricArn = "metricArn"
            case metricName = "metricName"
            case metricType = "metricType"
        }
    }

    public struct DescribeDefaultAuthorizerRequest: AWSEncodableShape {
        public init() {}
    }

    public struct DescribeDefaultAuthorizerResponse: AWSDecodableShape {
        /// The default authorizer's description.
        public let authorizerDescription: AuthorizerDescription?

        @inlinable
        public init(authorizerDescription: AuthorizerDescription? = nil) {
            self.authorizerDescription = authorizerDescription
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerDescription = "authorizerDescription"
        }
    }

    public struct DescribeDetectMitigationActionsTaskRequest: AWSEncodableShape {
        ///  The unique identifier of the task.
        public let taskId: String

        @inlinable
        public init(taskId: String) {
            self.taskId = taskId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.taskId, key: "taskId")
        }

        public func validate(name: String) throws {
            try self.validate(self.taskId, name: "taskId", parent: name, max: 128)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeDetectMitigationActionsTaskResponse: AWSDecodableShape {
        ///  The description of a task.
        public let taskSummary: DetectMitigationActionsTaskSummary?

        @inlinable
        public init(taskSummary: DetectMitigationActionsTaskSummary? = nil) {
            self.taskSummary = taskSummary
        }

        private enum CodingKeys: String, CodingKey {
            case taskSummary = "taskSummary"
        }
    }

    public struct DescribeDimensionRequest: AWSEncodableShape {
        /// The unique identifier for the dimension.
        public let name: String

        @inlinable
        public init(name: String) {
            self.name = name
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.name, key: "name")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeDimensionResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) for the dimension.
        public let arn: String?
        /// The date the dimension was created.
        public let creationDate: Date?
        /// The date the dimension was last modified.
        public let lastModifiedDate: Date?
        /// The unique identifier for the dimension.
        public let name: String?
        /// The value or list of values used to scope the dimension. For example, for topic filters, this is the pattern used to match the MQTT topic name.
        public let stringValues: [String]?
        /// The type of the dimension.
        public let type: DimensionType?

        @inlinable
        public init(arn: String? = nil, creationDate: Date? = nil, lastModifiedDate: Date? = nil, name: String? = nil, stringValues: [String]? = nil, type: DimensionType? = nil) {
            self.arn = arn
            self.creationDate = creationDate
            self.lastModifiedDate = lastModifiedDate
            self.name = name
            self.stringValues = stringValues
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case creationDate = "creationDate"
            case lastModifiedDate = "lastModifiedDate"
            case name = "name"
            case stringValues = "stringValues"
            case type = "type"
        }
    }

    public struct DescribeDomainConfigurationRequest: AWSEncodableShape {
        /// The name of the domain configuration.
        public let domainConfigurationName: String

        @inlinable
        public init(domainConfigurationName: String) {
            self.domainConfigurationName = domainConfigurationName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.domainConfigurationName, key: "domainConfigurationName")
        }

        public func validate(name: String) throws {
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, max: 128)
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, min: 1)
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, pattern: "^[\\w.:-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeDomainConfigurationResponse: AWSDecodableShape {
        /// An enumerated string that speciﬁes the application-layer protocol.    SECURE_MQTT - MQTT over TLS.      MQTT_WSS - MQTT over WebSocket.      HTTPS - HTTP over TLS.      DEFAULT - Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify application_layer protocol.  For more information, see Device communication protocols.
        public let applicationProtocol: ApplicationProtocol?
        /// An enumerated string that speciﬁes the authentication type.    CUSTOM_AUTH_X509 - Use custom authentication and authorization with additional details from the X.509 client certificate.      CUSTOM_AUTH - Use custom authentication and authorization. For more information, see Custom authentication and authorization.      AWS_X509 - Use X.509 client certificates without custom authentication and authorization. For more information, see X.509 client certificates.      AWS_SIGV4 - Use Amazon Web Services Signature Version 4. For more information, see IAM users, groups, and roles.      DEFAULT - Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify authentication type. For more information, see Device communication protocols.
        public let authenticationType: AuthenticationType?
        /// An object that specifies the authorization service for a domain.
        public let authorizerConfig: AuthorizerConfig?
        /// An object that speciﬁes the client certificate conﬁguration for a domain.
        public let clientCertificateConfig: ClientCertificateConfig?
        /// The ARN of the domain configuration.
        public let domainConfigurationArn: String?
        /// The name of the domain configuration.
        public let domainConfigurationName: String?
        /// A Boolean value that specifies the current state of the domain configuration.
        public let domainConfigurationStatus: DomainConfigurationStatus?
        /// The name of the domain.
        public let domainName: String?
        /// The type of the domain.
        public let domainType: DomainType?
        /// The date and time the domain configuration's status was last changed.
        public let lastStatusChangeDate: Date?
        /// The server certificate configuration.
        public let serverCertificateConfig: ServerCertificateConfig?
        /// A list containing summary information about the server certificate included in the domain configuration.
        public let serverCertificates: [ServerCertificateSummary]?
        /// The type of service delivered by the endpoint.
        public let serviceType: ServiceType?
        /// An object that specifies the TLS configuration for a domain.
        public let tlsConfig: TlsConfig?

        @inlinable
        public init(applicationProtocol: ApplicationProtocol? = nil, authenticationType: AuthenticationType? = nil, authorizerConfig: AuthorizerConfig? = nil, clientCertificateConfig: ClientCertificateConfig? = nil, domainConfigurationArn: String? = nil, domainConfigurationName: String? = nil, domainConfigurationStatus: DomainConfigurationStatus? = nil, domainName: String? = nil, domainType: DomainType? = nil, lastStatusChangeDate: Date? = nil, serverCertificateConfig: ServerCertificateConfig? = nil, serverCertificates: [ServerCertificateSummary]? = nil, serviceType: ServiceType? = nil, tlsConfig: TlsConfig? = nil) {
            self.applicationProtocol = applicationProtocol
            self.authenticationType = authenticationType
            self.authorizerConfig = authorizerConfig
            self.clientCertificateConfig = clientCertificateConfig
            self.domainConfigurationArn = domainConfigurationArn
            self.domainConfigurationName = domainConfigurationName
            self.domainConfigurationStatus = domainConfigurationStatus
            self.domainName = domainName
            self.domainType = domainType
            self.lastStatusChangeDate = lastStatusChangeDate
            self.serverCertificateConfig = serverCertificateConfig
            self.serverCertificates = serverCertificates
            self.serviceType = serviceType
            self.tlsConfig = tlsConfig
        }

        private enum CodingKeys: String, CodingKey {
            case applicationProtocol = "applicationProtocol"
            case authenticationType = "authenticationType"
            case authorizerConfig = "authorizerConfig"
            case clientCertificateConfig = "clientCertificateConfig"
            case domainConfigurationArn = "domainConfigurationArn"
            case domainConfigurationName = "domainConfigurationName"
            case domainConfigurationStatus = "domainConfigurationStatus"
            case domainName = "domainName"
            case domainType = "domainType"
            case lastStatusChangeDate = "lastStatusChangeDate"
            case serverCertificateConfig = "serverCertificateConfig"
            case serverCertificates = "serverCertificates"
            case serviceType = "serviceType"
            case tlsConfig = "tlsConfig"
        }
    }

    public struct DescribeEndpointRequest: AWSEncodableShape {
        /// The endpoint type. Valid endpoint types include:    iot:Data - Returns a VeriSign signed data endpoint.      iot:Data-ATS - Returns an ATS signed data endpoint.      iot:CredentialProvider - Returns an IoT credentials provider API endpoint.      iot:Jobs - Returns an IoT device management Jobs API endpoint.   We strongly recommend that customers use the newer iot:Data-ATS endpoint type to avoid  issues related to the widespread distrust of Symantec certificate authorities. ATS Signed Certificates are more secure and are trusted by most popular browsers.
        public let endpointType: String?

        @inlinable
        public init(endpointType: String? = nil) {
            self.endpointType = endpointType
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.endpointType, key: "endpointType")
        }

        public func validate(name: String) throws {
            try self.validate(self.endpointType, name: "endpointType", parent: name, max: 128)
            try self.validate(self.endpointType, name: "endpointType", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeEndpointResponse: AWSDecodableShape {
        /// The endpoint. The format of the endpoint is as follows: identifier.iot.region.amazonaws.com.
        public let endpointAddress: String?

        @inlinable
        public init(endpointAddress: String? = nil) {
            self.endpointAddress = endpointAddress
        }

        private enum CodingKeys: String, CodingKey {
            case endpointAddress = "endpointAddress"
        }
    }

    public struct DescribeEventConfigurationsRequest: AWSEncodableShape {
        public init() {}
    }

    public struct DescribeEventConfigurationsResponse: AWSDecodableShape {
        /// The creation date of the event configuration.
        public let creationDate: Date?
        /// The event configurations.
        public let eventConfigurations: [EventType: Configuration]?
        /// The date the event configurations were last modified.
        public let lastModifiedDate: Date?

        @inlinable
        public init(creationDate: Date? = nil, eventConfigurations: [EventType: Configuration]? = nil, lastModifiedDate: Date? = nil) {
            self.creationDate = creationDate
            self.eventConfigurations = eventConfigurations
            self.lastModifiedDate = lastModifiedDate
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
            case eventConfigurations = "eventConfigurations"
            case lastModifiedDate = "lastModifiedDate"
        }
    }

    public struct DescribeFleetMetricRequest: AWSEncodableShape {
        /// The name of the fleet metric to describe.
        public let metricName: String

        @inlinable
        public init(metricName: String) {
            self.metricName = metricName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.metricName, key: "metricName")
        }

        public func validate(name: String) throws {
            try self.validate(self.metricName, name: "metricName", parent: name, max: 128)
            try self.validate(self.metricName, name: "metricName", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "^[a-zA-Z0-9_\\-\\.]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeFleetMetricResponse: AWSDecodableShape {
        /// The field to aggregate.
        public let aggregationField: String?
        /// The type of the aggregation query.
        public let aggregationType: AggregationType?
        /// The date when the fleet metric is created.
        public let creationDate: Date?
        /// The fleet metric description.
        public let description: String?
        /// The name of the index to search.
        public let indexName: String?
        /// The date when the fleet metric is last modified.
        public let lastModifiedDate: Date?
        /// The ARN of the fleet metric to describe.
        public let metricArn: String?
        /// The name of the fleet metric to describe.
        public let metricName: String?
        /// The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 day)] and must be multiple of 60.
        public let period: Int?
        /// The search query string.
        public let queryString: String?
        /// The query version.
        public let queryVersion: String?
        /// Used to support unit transformation such as milliseconds to seconds. The unit must be supported by CW metric.
        public let unit: FleetMetricUnit?
        /// The version of the fleet metric.
        public let version: Int64?

        @inlinable
        public init(aggregationField: String? = nil, aggregationType: AggregationType? = nil, creationDate: Date? = nil, description: String? = nil, indexName: String? = nil, lastModifiedDate: Date? = nil, metricArn: String? = nil, metricName: String? = nil, period: Int? = nil, queryString: String? = nil, queryVersion: String? = nil, unit: FleetMetricUnit? = nil, version: Int64? = nil) {
            self.aggregationField = aggregationField
            self.aggregationType = aggregationType
            self.creationDate = creationDate
            self.description = description
            self.indexName = indexName
            self.lastModifiedDate = lastModifiedDate
            self.metricArn = metricArn
            self.metricName = metricName
            self.period = period
            self.queryString = queryString
            self.queryVersion = queryVersion
            self.unit = unit
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case aggregationField = "aggregationField"
            case aggregationType = "aggregationType"
            case creationDate = "creationDate"
            case description = "description"
            case indexName = "indexName"
            case lastModifiedDate = "lastModifiedDate"
            case metricArn = "metricArn"
            case metricName = "metricName"
            case period = "period"
            case queryString = "queryString"
            case queryVersion = "queryVersion"
            case unit = "unit"
            case version = "version"
        }
    }

    public struct DescribeIndexRequest: AWSEncodableShape {
        /// The index name.
        public let indexName: String

        @inlinable
        public init(indexName: String) {
            self.indexName = indexName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.indexName, key: "indexName")
        }

        public func validate(name: String) throws {
            try self.validate(self.indexName, name: "indexName", parent: name, max: 128)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeIndexResponse: AWSDecodableShape {
        /// The index name.
        public let indexName: String?
        /// The index status.
        public let indexStatus: IndexStatus?
        /// Contains a value that specifies the type of indexing performed. Valid values are:   REGISTRY – Your thing index contains only registry data.   REGISTRY_AND_SHADOW - Your thing index contains registry data and shadow data.   REGISTRY_AND_CONNECTIVITY_STATUS - Your thing index contains registry data and thing connectivity status data.   REGISTRY_AND_SHADOW_AND_CONNECTIVITY_STATUS - Your thing index contains registry data, shadow data, and thing connectivity status data.   MULTI_INDEXING_MODE - Your thing index contains multiple data sources. For more information, see  GetIndexingConfiguration.
        public let schema: String?

        @inlinable
        public init(indexName: String? = nil, indexStatus: IndexStatus? = nil, schema: String? = nil) {
            self.indexName = indexName
            self.indexStatus = indexStatus
            self.schema = schema
        }

        private enum CodingKeys: String, CodingKey {
            case indexName = "indexName"
            case indexStatus = "indexStatus"
            case schema = "schema"
        }
    }

    public struct DescribeJobExecutionRequest: AWSEncodableShape {
        /// A string (consisting of the digits "0" through "9" which is used to specify a particular job execution on a particular device.
        public let executionNumber: Int64?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String
        /// The name of the thing on which the job execution is running.
        public let thingName: String

        @inlinable
        public init(executionNumber: Int64? = nil, jobId: String, thingName: String) {
            self.executionNumber = executionNumber
            self.jobId = jobId
            self.thingName = thingName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.executionNumber, key: "executionNumber")
            request.encodePath(self.jobId, key: "jobId")
            request.encodePath(self.thingName, key: "thingName")
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeJobExecutionResponse: AWSDecodableShape {
        /// Information about the job execution.
        public let execution: JobExecution?

        @inlinable
        public init(execution: JobExecution? = nil) {
            self.execution = execution
        }

        private enum CodingKeys: String, CodingKey {
            case execution = "execution"
        }
    }

    public struct DescribeJobRequest: AWSEncodableShape {
        /// Provides a view of the job document before and after the substitution parameters have been resolved with their exact values.
        public let beforeSubstitution: Bool?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String

        @inlinable
        public init(beforeSubstitution: Bool? = nil, jobId: String) {
            self.beforeSubstitution = beforeSubstitution
            self.jobId = jobId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.beforeSubstitution, key: "beforeSubstitution")
            request.encodePath(self.jobId, key: "jobId")
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeJobResponse: AWSDecodableShape {
        /// An S3 link to the job document.
        public let documentSource: String?
        /// Information about the job.
        public let job: Job?

        @inlinable
        public init(documentSource: String? = nil, job: Job? = nil) {
            self.documentSource = documentSource
            self.job = job
        }

        private enum CodingKeys: String, CodingKey {
            case documentSource = "documentSource"
            case job = "job"
        }
    }

    public struct DescribeJobTemplateRequest: AWSEncodableShape {
        /// The unique identifier of the job template.
        public let jobTemplateId: String

        @inlinable
        public init(jobTemplateId: String) {
            self.jobTemplateId = jobTemplateId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.jobTemplateId, key: "jobTemplateId")
        }

        public func validate(name: String) throws {
            try self.validate(self.jobTemplateId, name: "jobTemplateId", parent: name, max: 64)
            try self.validate(self.jobTemplateId, name: "jobTemplateId", parent: name, min: 1)
            try self.validate(self.jobTemplateId, name: "jobTemplateId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeJobTemplateResponse: AWSDecodableShape {
        public let abortConfig: AbortConfig?
        /// The time, in seconds since the epoch, when the job template was created.
        public let createdAt: Date?
        /// A description of the job template.
        public let description: String?
        /// The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.  Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.
        public let destinationPackageVersions: [String]?
        /// The job document.
        public let document: String?
        /// An S3 link to the job document.
        public let documentSource: String?
        /// The configuration that determines how many retries are allowed for each failure type for a job.
        public let jobExecutionsRetryConfig: JobExecutionsRetryConfig?
        public let jobExecutionsRolloutConfig: JobExecutionsRolloutConfig?
        /// The ARN of the job template.
        public let jobTemplateArn: String?
        /// The unique identifier of the job template.
        public let jobTemplateId: String?
        /// Allows you to configure an optional maintenance window for the rollout of a job document to all devices in the target group for a job.
        public let maintenanceWindows: [MaintenanceWindow]?
        public let presignedUrlConfig: PresignedUrlConfig?
        public let timeoutConfig: TimeoutConfig?

        @inlinable
        public init(abortConfig: AbortConfig? = nil, createdAt: Date? = nil, description: String? = nil, destinationPackageVersions: [String]? = nil, document: String? = nil, documentSource: String? = nil, jobExecutionsRetryConfig: JobExecutionsRetryConfig? = nil, jobExecutionsRolloutConfig: JobExecutionsRolloutConfig? = nil, jobTemplateArn: String? = nil, jobTemplateId: String? = nil, maintenanceWindows: [MaintenanceWindow]? = nil, presignedUrlConfig: PresignedUrlConfig? = nil, timeoutConfig: TimeoutConfig? = nil) {
            self.abortConfig = abortConfig
            self.createdAt = createdAt
            self.description = description
            self.destinationPackageVersions = destinationPackageVersions
            self.document = document
            self.documentSource = documentSource
            self.jobExecutionsRetryConfig = jobExecutionsRetryConfig
            self.jobExecutionsRolloutConfig = jobExecutionsRolloutConfig
            self.jobTemplateArn = jobTemplateArn
            self.jobTemplateId = jobTemplateId
            self.maintenanceWindows = maintenanceWindows
            self.presignedUrlConfig = presignedUrlConfig
            self.timeoutConfig = timeoutConfig
        }

        private enum CodingKeys: String, CodingKey {
            case abortConfig = "abortConfig"
            case createdAt = "createdAt"
            case description = "description"
            case destinationPackageVersions = "destinationPackageVersions"
            case document = "document"
            case documentSource = "documentSource"
            case jobExecutionsRetryConfig = "jobExecutionsRetryConfig"
            case jobExecutionsRolloutConfig = "jobExecutionsRolloutConfig"
            case jobTemplateArn = "jobTemplateArn"
            case jobTemplateId = "jobTemplateId"
            case maintenanceWindows = "maintenanceWindows"
            case presignedUrlConfig = "presignedUrlConfig"
            case timeoutConfig = "timeoutConfig"
        }
    }

    public struct DescribeManagedJobTemplateRequest: AWSEncodableShape {
        /// The unique name of a managed job template, which is required.
        public let templateName: String
        /// An optional parameter to specify version of a managed template. If not specified, the pre-defined default version is returned.
        public let templateVersion: String?

        @inlinable
        public init(templateName: String, templateVersion: String? = nil) {
            self.templateName = templateName
            self.templateVersion = templateVersion
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.templateName, key: "templateName")
            request.encodeQuery(self.templateVersion, key: "templateVersion")
        }

        public func validate(name: String) throws {
            try self.validate(self.templateName, name: "templateName", parent: name, max: 64)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateVersion, name: "templateVersion", parent: name, pattern: "^[1-9]+.[0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeManagedJobTemplateResponse: AWSDecodableShape {
        /// The unique description of a managed template.
        public let description: String?
        /// The document schema for a managed job template.
        public let document: String?
        /// A map of key-value pairs that you can use as guidance to specify the inputs for creating a job from a managed template.   documentParameters can only be used when creating jobs from Amazon Web Services managed templates. This parameter can't be used with custom job templates or to create jobs from them.
        public let documentParameters: [DocumentParameter]?
        /// A list of environments that are supported with the managed job template.
        public let environments: [String]?
        /// The unique Amazon Resource Name (ARN) of the managed template.
        public let templateArn: String?
        /// The unique name of a managed template, such as AWS-Reboot.
        public let templateName: String?
        /// The version for a managed template.
        public let templateVersion: String?

        @inlinable
        public init(description: String? = nil, document: String? = nil, documentParameters: [DocumentParameter]? = nil, environments: [String]? = nil, templateArn: String? = nil, templateName: String? = nil, templateVersion: String? = nil) {
            self.description = description
            self.document = document
            self.documentParameters = documentParameters
            self.environments = environments
            self.templateArn = templateArn
            self.templateName = templateName
            self.templateVersion = templateVersion
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case document = "document"
            case documentParameters = "documentParameters"
            case environments = "environments"
            case templateArn = "templateArn"
            case templateName = "templateName"
            case templateVersion = "templateVersion"
        }
    }

    public struct DescribeMitigationActionRequest: AWSEncodableShape {
        /// The friendly name that uniquely identifies the mitigation action.
        public let actionName: String

        @inlinable
        public init(actionName: String) {
            self.actionName = actionName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.actionName, key: "actionName")
        }

        public func validate(name: String) throws {
            try self.validate(self.actionName, name: "actionName", parent: name, max: 128)
            try self.validate(self.actionName, name: "actionName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeMitigationActionResponse: AWSDecodableShape {
        /// The ARN that identifies this migration action.
        public let actionArn: String?
        /// A unique identifier for this action.
        public let actionId: String?
        /// The friendly name that uniquely identifies the mitigation action.
        public let actionName: String?
        /// Parameters that control how the mitigation action is applied, specific to the type of mitigation action.
        public let actionParams: MitigationActionParams?
        /// The type of mitigation action.
        public let actionType: MitigationActionType?
        /// The date and time when the mitigation action was added to your Amazon Web Services accounts.
        public let creationDate: Date?
        /// The date and time when the mitigation action was last changed.
        public let lastModifiedDate: Date?
        /// The ARN of the IAM role used to apply this action.
        public let roleArn: String?

        @inlinable
        public init(actionArn: String? = nil, actionId: String? = nil, actionName: String? = nil, actionParams: MitigationActionParams? = nil, actionType: MitigationActionType? = nil, creationDate: Date? = nil, lastModifiedDate: Date? = nil, roleArn: String? = nil) {
            self.actionArn = actionArn
            self.actionId = actionId
            self.actionName = actionName
            self.actionParams = actionParams
            self.actionType = actionType
            self.creationDate = creationDate
            self.lastModifiedDate = lastModifiedDate
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case actionArn = "actionArn"
            case actionId = "actionId"
            case actionName = "actionName"
            case actionParams = "actionParams"
            case actionType = "actionType"
            case creationDate = "creationDate"
            case lastModifiedDate = "lastModifiedDate"
            case roleArn = "roleArn"
        }
    }

    public struct DescribeProvisioningTemplateRequest: AWSEncodableShape {
        /// The name of the provisioning template.
        public let templateName: String

        @inlinable
        public init(templateName: String) {
            self.templateName = templateName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.templateName, key: "templateName")
        }

        public func validate(name: String) throws {
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeProvisioningTemplateResponse: AWSDecodableShape {
        /// The date when the provisioning template was created.
        public let creationDate: Date?
        /// The default fleet template version ID.
        public let defaultVersionId: Int?
        /// The description of the provisioning template.
        public let description: String?
        /// True if the provisioning template is enabled, otherwise false.
        public let enabled: Bool?
        /// The date when the provisioning template was last modified.
        public let lastModifiedDate: Date?
        /// Gets information about a pre-provisioned hook.
        public let preProvisioningHook: ProvisioningHook?
        /// The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a device.
        public let provisioningRoleArn: String?
        /// The ARN of the provisioning template.
        public let templateArn: String?
        /// The JSON formatted contents of the provisioning template.
        public let templateBody: String?
        /// The name of the provisioning template.
        public let templateName: String?
        /// The type you define in a provisioning template. You can create a template with only one type. You can't change the template type after its creation. The default value is FLEET_PROVISIONING. For more information about provisioning template, see: Provisioning template.
        public let type: TemplateType?

        @inlinable
        public init(creationDate: Date? = nil, defaultVersionId: Int? = nil, description: String? = nil, enabled: Bool? = nil, lastModifiedDate: Date? = nil, preProvisioningHook: ProvisioningHook? = nil, provisioningRoleArn: String? = nil, templateArn: String? = nil, templateBody: String? = nil, templateName: String? = nil, type: TemplateType? = nil) {
            self.creationDate = creationDate
            self.defaultVersionId = defaultVersionId
            self.description = description
            self.enabled = enabled
            self.lastModifiedDate = lastModifiedDate
            self.preProvisioningHook = preProvisioningHook
            self.provisioningRoleArn = provisioningRoleArn
            self.templateArn = templateArn
            self.templateBody = templateBody
            self.templateName = templateName
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
            case defaultVersionId = "defaultVersionId"
            case description = "description"
            case enabled = "enabled"
            case lastModifiedDate = "lastModifiedDate"
            case preProvisioningHook = "preProvisioningHook"
            case provisioningRoleArn = "provisioningRoleArn"
            case templateArn = "templateArn"
            case templateBody = "templateBody"
            case templateName = "templateName"
            case type = "type"
        }
    }

    public struct DescribeProvisioningTemplateVersionRequest: AWSEncodableShape {
        /// The template name.
        public let templateName: String
        /// The provisioning template version ID.
        public let versionId: Int

        @inlinable
        public init(templateName: String, versionId: Int) {
            self.templateName = templateName
            self.versionId = versionId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.templateName, key: "templateName")
            request.encodePath(self.versionId, key: "versionId")
        }

        public func validate(name: String) throws {
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeProvisioningTemplateVersionResponse: AWSDecodableShape {
        /// The date when the provisioning template version was created.
        public let creationDate: Date?
        /// True if the provisioning template version is the default version.
        public let isDefaultVersion: Bool?
        /// The JSON formatted contents of the provisioning template version.
        public let templateBody: String?
        /// The provisioning template version ID.
        public let versionId: Int?

        @inlinable
        public init(creationDate: Date? = nil, isDefaultVersion: Bool? = nil, templateBody: String? = nil, versionId: Int? = nil) {
            self.creationDate = creationDate
            self.isDefaultVersion = isDefaultVersion
            self.templateBody = templateBody
            self.versionId = versionId
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
            case isDefaultVersion = "isDefaultVersion"
            case templateBody = "templateBody"
            case versionId = "versionId"
        }
    }

    public struct DescribeRoleAliasRequest: AWSEncodableShape {
        /// The role alias to describe.
        public let roleAlias: String

        @inlinable
        public init(roleAlias: String) {
            self.roleAlias = roleAlias
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.roleAlias, key: "roleAlias")
        }

        public func validate(name: String) throws {
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, max: 128)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, min: 1)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, pattern: "^[\\w=,@-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeRoleAliasResponse: AWSDecodableShape {
        /// The role alias description.
        public let roleAliasDescription: RoleAliasDescription?

        @inlinable
        public init(roleAliasDescription: RoleAliasDescription? = nil) {
            self.roleAliasDescription = roleAliasDescription
        }

        private enum CodingKeys: String, CodingKey {
            case roleAliasDescription = "roleAliasDescription"
        }
    }

    public struct DescribeScheduledAuditRequest: AWSEncodableShape {
        /// The name of the scheduled audit whose information you want to get.
        public let scheduledAuditName: String

        @inlinable
        public init(scheduledAuditName: String) {
            self.scheduledAuditName = scheduledAuditName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.scheduledAuditName, key: "scheduledAuditName")
        }

        public func validate(name: String) throws {
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, max: 128)
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, min: 1)
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeScheduledAuditResponse: AWSDecodableShape {
        /// The day of the month on which the scheduled audit takes place. This is will be 1 through 31 or LAST. If days 29-31 are specified, and the month does not have that many days, the audit takes place on the LAST day of the month.
        public let dayOfMonth: String?
        /// The day of the week on which the scheduled audit takes place, either one of SUN, MON, TUE, WED, THU, FRI, or SAT.
        public let dayOfWeek: DayOfWeek?
        /// How often the scheduled audit takes place, either one of DAILY, WEEKLY, BIWEEKLY, or MONTHLY. The start time of each audit is determined by the system.
        public let frequency: AuditFrequency?
        /// The ARN of the scheduled audit.
        public let scheduledAuditArn: String?
        /// The name of the scheduled audit.
        public let scheduledAuditName: String?
        /// Which checks are performed during the scheduled audit. Checks must be  enabled for your account. (Use DescribeAccountAuditConfiguration to see the list of all checks, including those that are enabled or use UpdateAccountAuditConfiguration  to select which checks are enabled.)
        public let targetCheckNames: [String]?

        @inlinable
        public init(dayOfMonth: String? = nil, dayOfWeek: DayOfWeek? = nil, frequency: AuditFrequency? = nil, scheduledAuditArn: String? = nil, scheduledAuditName: String? = nil, targetCheckNames: [String]? = nil) {
            self.dayOfMonth = dayOfMonth
            self.dayOfWeek = dayOfWeek
            self.frequency = frequency
            self.scheduledAuditArn = scheduledAuditArn
            self.scheduledAuditName = scheduledAuditName
            self.targetCheckNames = targetCheckNames
        }

        private enum CodingKeys: String, CodingKey {
            case dayOfMonth = "dayOfMonth"
            case dayOfWeek = "dayOfWeek"
            case frequency = "frequency"
            case scheduledAuditArn = "scheduledAuditArn"
            case scheduledAuditName = "scheduledAuditName"
            case targetCheckNames = "targetCheckNames"
        }
    }

    public struct DescribeSecurityProfileRequest: AWSEncodableShape {
        /// The name of the security profile whose information you want to get.
        public let securityProfileName: String

        @inlinable
        public init(securityProfileName: String) {
            self.securityProfileName = securityProfileName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.securityProfileName, key: "securityProfileName")
        }

        public func validate(name: String) throws {
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeSecurityProfileResponse: AWSDecodableShape {
        ///  Please use DescribeSecurityProfileResponse$additionalMetricsToRetainV2 instead.  A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's behaviors, but it is also retained for any metric specified here.
        public let additionalMetricsToRetain: [String]?
        /// A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's behaviors, but it is also retained for any metric specified here.
        public let additionalMetricsToRetainV2: [MetricToRetain]?
        /// Where the alerts are sent. (Alerts are always sent to the console.)
        public let alertTargets: [AlertTargetType: AlertTarget]?
        /// Specifies the behaviors that, when violated by a device (thing), cause an alert.
        public let behaviors: [Behavior]?
        /// The time the security profile was created.
        public let creationDate: Date?
        /// The time the security profile was last modified.
        public let lastModifiedDate: Date?
        /// Specifies the MQTT topic and role ARN required for metric export.
        public let metricsExportConfig: MetricsExportConfig?
        /// The ARN of the security profile.
        public let securityProfileArn: String?
        /// A description of the security profile (associated with the security profile when it was created or updated).
        public let securityProfileDescription: String?
        /// The name of the security profile.
        public let securityProfileName: String?
        /// The version of the security profile. A new version is generated whenever the security profile is updated.
        public let version: Int64?

        @inlinable
        public init(additionalMetricsToRetainV2: [MetricToRetain]? = nil, alertTargets: [AlertTargetType: AlertTarget]? = nil, behaviors: [Behavior]? = nil, creationDate: Date? = nil, lastModifiedDate: Date? = nil, metricsExportConfig: MetricsExportConfig? = nil, securityProfileArn: String? = nil, securityProfileDescription: String? = nil, securityProfileName: String? = nil, version: Int64? = nil) {
            self.additionalMetricsToRetain = nil
            self.additionalMetricsToRetainV2 = additionalMetricsToRetainV2
            self.alertTargets = alertTargets
            self.behaviors = behaviors
            self.creationDate = creationDate
            self.lastModifiedDate = lastModifiedDate
            self.metricsExportConfig = metricsExportConfig
            self.securityProfileArn = securityProfileArn
            self.securityProfileDescription = securityProfileDescription
            self.securityProfileName = securityProfileName
            self.version = version
        }

        @available(*, deprecated, message: "Members additionalMetricsToRetain have been deprecated")
        @inlinable
        public init(additionalMetricsToRetain: [String]? = nil, additionalMetricsToRetainV2: [MetricToRetain]? = nil, alertTargets: [AlertTargetType: AlertTarget]? = nil, behaviors: [Behavior]? = nil, creationDate: Date? = nil, lastModifiedDate: Date? = nil, metricsExportConfig: MetricsExportConfig? = nil, securityProfileArn: String? = nil, securityProfileDescription: String? = nil, securityProfileName: String? = nil, version: Int64? = nil) {
            self.additionalMetricsToRetain = additionalMetricsToRetain
            self.additionalMetricsToRetainV2 = additionalMetricsToRetainV2
            self.alertTargets = alertTargets
            self.behaviors = behaviors
            self.creationDate = creationDate
            self.lastModifiedDate = lastModifiedDate
            self.metricsExportConfig = metricsExportConfig
            self.securityProfileArn = securityProfileArn
            self.securityProfileDescription = securityProfileDescription
            self.securityProfileName = securityProfileName
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case additionalMetricsToRetain = "additionalMetricsToRetain"
            case additionalMetricsToRetainV2 = "additionalMetricsToRetainV2"
            case alertTargets = "alertTargets"
            case behaviors = "behaviors"
            case creationDate = "creationDate"
            case lastModifiedDate = "lastModifiedDate"
            case metricsExportConfig = "metricsExportConfig"
            case securityProfileArn = "securityProfileArn"
            case securityProfileDescription = "securityProfileDescription"
            case securityProfileName = "securityProfileName"
            case version = "version"
        }
    }

    public struct DescribeStreamRequest: AWSEncodableShape {
        /// The stream ID.
        public let streamId: String

        @inlinable
        public init(streamId: String) {
            self.streamId = streamId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.streamId, key: "streamId")
        }

        public func validate(name: String) throws {
            try self.validate(self.streamId, name: "streamId", parent: name, max: 128)
            try self.validate(self.streamId, name: "streamId", parent: name, min: 1)
            try self.validate(self.streamId, name: "streamId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeStreamResponse: AWSDecodableShape {
        /// Information about the stream.
        public let streamInfo: StreamInfo?

        @inlinable
        public init(streamInfo: StreamInfo? = nil) {
            self.streamInfo = streamInfo
        }

        private enum CodingKeys: String, CodingKey {
            case streamInfo = "streamInfo"
        }
    }

    public struct DescribeThingGroupRequest: AWSEncodableShape {
        /// The name of the thing group.
        public let thingGroupName: String

        @inlinable
        public init(thingGroupName: String) {
            self.thingGroupName = thingGroupName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.thingGroupName, key: "thingGroupName")
        }

        public func validate(name: String) throws {
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeThingGroupResponse: AWSDecodableShape {
        /// The dynamic thing group index name.
        public let indexName: String?
        /// The dynamic thing group search query string.
        public let queryString: String?
        /// The dynamic thing group query version.
        public let queryVersion: String?
        /// The dynamic thing group status.
        public let status: DynamicGroupStatus?
        /// The thing group ARN.
        public let thingGroupArn: String?
        /// The thing group ID.
        public let thingGroupId: String?
        /// Thing group metadata.
        public let thingGroupMetadata: ThingGroupMetadata?
        /// The name of the thing group.
        public let thingGroupName: String?
        /// The thing group properties.
        public let thingGroupProperties: ThingGroupProperties?
        /// The version of the thing group.
        public let version: Int64?

        @inlinable
        public init(indexName: String? = nil, queryString: String? = nil, queryVersion: String? = nil, status: DynamicGroupStatus? = nil, thingGroupArn: String? = nil, thingGroupId: String? = nil, thingGroupMetadata: ThingGroupMetadata? = nil, thingGroupName: String? = nil, thingGroupProperties: ThingGroupProperties? = nil, version: Int64? = nil) {
            self.indexName = indexName
            self.queryString = queryString
            self.queryVersion = queryVersion
            self.status = status
            self.thingGroupArn = thingGroupArn
            self.thingGroupId = thingGroupId
            self.thingGroupMetadata = thingGroupMetadata
            self.thingGroupName = thingGroupName
            self.thingGroupProperties = thingGroupProperties
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case indexName = "indexName"
            case queryString = "queryString"
            case queryVersion = "queryVersion"
            case status = "status"
            case thingGroupArn = "thingGroupArn"
            case thingGroupId = "thingGroupId"
            case thingGroupMetadata = "thingGroupMetadata"
            case thingGroupName = "thingGroupName"
            case thingGroupProperties = "thingGroupProperties"
            case version = "version"
        }
    }

    public struct DescribeThingRegistrationTaskRequest: AWSEncodableShape {
        /// The task ID.
        public let taskId: String

        @inlinable
        public init(taskId: String) {
            self.taskId = taskId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.taskId, key: "taskId")
        }

        public func validate(name: String) throws {
            try self.validate(self.taskId, name: "taskId", parent: name, max: 40)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeThingRegistrationTaskResponse: AWSDecodableShape {
        /// The task creation date.
        public let creationDate: Date?
        /// The number of things that failed to be provisioned.
        public let failureCount: Int?
        /// The S3 bucket that contains the input file.
        public let inputFileBucket: String?
        /// The input file key.
        public let inputFileKey: String?
        /// The date when the task was last modified.
        public let lastModifiedDate: Date?
        /// The message.
        public let message: String?
        /// The progress of the bulk provisioning task expressed as a percentage.
        public let percentageProgress: Int?
        /// The role ARN that grants access to the input file bucket.
        public let roleArn: String?
        /// The status of the bulk thing provisioning task.
        public let status: Status?
        /// The number of things successfully provisioned.
        public let successCount: Int?
        /// The task ID.
        public let taskId: String?
        /// The task's template.
        public let templateBody: String?

        @inlinable
        public init(creationDate: Date? = nil, failureCount: Int? = nil, inputFileBucket: String? = nil, inputFileKey: String? = nil, lastModifiedDate: Date? = nil, message: String? = nil, percentageProgress: Int? = nil, roleArn: String? = nil, status: Status? = nil, successCount: Int? = nil, taskId: String? = nil, templateBody: String? = nil) {
            self.creationDate = creationDate
            self.failureCount = failureCount
            self.inputFileBucket = inputFileBucket
            self.inputFileKey = inputFileKey
            self.lastModifiedDate = lastModifiedDate
            self.message = message
            self.percentageProgress = percentageProgress
            self.roleArn = roleArn
            self.status = status
            self.successCount = successCount
            self.taskId = taskId
            self.templateBody = templateBody
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
            case failureCount = "failureCount"
            case inputFileBucket = "inputFileBucket"
            case inputFileKey = "inputFileKey"
            case lastModifiedDate = "lastModifiedDate"
            case message = "message"
            case percentageProgress = "percentageProgress"
            case roleArn = "roleArn"
            case status = "status"
            case successCount = "successCount"
            case taskId = "taskId"
            case templateBody = "templateBody"
        }
    }

    public struct DescribeThingRequest: AWSEncodableShape {
        /// The name of the thing.
        public let thingName: String

        @inlinable
        public init(thingName: String) {
            self.thingName = thingName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.thingName, key: "thingName")
        }

        public func validate(name: String) throws {
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeThingResponse: AWSDecodableShape {
        /// The thing attributes.
        public let attributes: [String: String]?
        /// The name of the billing group the thing belongs to.
        public let billingGroupName: String?
        /// The default MQTT client ID. For a typical device, the thing name is also used as the default MQTT client ID.
        /// 			Although we don’t require a mapping between a thing's registry name and its use of MQTT client IDs, certificates, or
        /// 			shadow state, we recommend that you choose a thing name and use it as the MQTT client ID for the registry and the Device Shadow service. This lets you better organize your IoT fleet without removing the flexibility of the underlying device certificate model or shadows.
        public let defaultClientId: String?
        /// The ARN of the thing to describe.
        public let thingArn: String?
        /// The ID of the thing to describe.
        public let thingId: String?
        /// The name of the thing.
        public let thingName: String?
        /// The thing type name.
        public let thingTypeName: String?
        /// The current version of the thing record in the registry.  To avoid unintentional changes to the information in the registry, you can pass
        /// 				the version information in the expectedVersion parameter of the
        /// 					UpdateThing and DeleteThing calls.
        public let version: Int64?

        @inlinable
        public init(attributes: [String: String]? = nil, billingGroupName: String? = nil, defaultClientId: String? = nil, thingArn: String? = nil, thingId: String? = nil, thingName: String? = nil, thingTypeName: String? = nil, version: Int64? = nil) {
            self.attributes = attributes
            self.billingGroupName = billingGroupName
            self.defaultClientId = defaultClientId
            self.thingArn = thingArn
            self.thingId = thingId
            self.thingName = thingName
            self.thingTypeName = thingTypeName
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "attributes"
            case billingGroupName = "billingGroupName"
            case defaultClientId = "defaultClientId"
            case thingArn = "thingArn"
            case thingId = "thingId"
            case thingName = "thingName"
            case thingTypeName = "thingTypeName"
            case version = "version"
        }
    }

    public struct DescribeThingTypeRequest: AWSEncodableShape {
        /// The name of the thing type.
        public let thingTypeName: String

        @inlinable
        public init(thingTypeName: String) {
            self.thingTypeName = thingTypeName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.thingTypeName, key: "thingTypeName")
        }

        public func validate(name: String) throws {
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, max: 128)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeThingTypeResponse: AWSDecodableShape {
        /// The thing type ARN.
        public let thingTypeArn: String?
        /// The thing type ID.
        public let thingTypeId: String?
        /// The ThingTypeMetadata contains additional information about the thing type
        /// 			including: creation date and time, a value indicating whether the thing type is
        /// 			deprecated, and a date and time when it was deprecated.
        public let thingTypeMetadata: ThingTypeMetadata?
        /// The name of the thing type.
        public let thingTypeName: String?
        /// The ThingTypeProperties contains information about the thing type including
        /// 			description, a list of searchable thing attribute names, and MQTT5 configuration.
        public let thingTypeProperties: ThingTypeProperties?

        @inlinable
        public init(thingTypeArn: String? = nil, thingTypeId: String? = nil, thingTypeMetadata: ThingTypeMetadata? = nil, thingTypeName: String? = nil, thingTypeProperties: ThingTypeProperties? = nil) {
            self.thingTypeArn = thingTypeArn
            self.thingTypeId = thingTypeId
            self.thingTypeMetadata = thingTypeMetadata
            self.thingTypeName = thingTypeName
            self.thingTypeProperties = thingTypeProperties
        }

        private enum CodingKeys: String, CodingKey {
            case thingTypeArn = "thingTypeArn"
            case thingTypeId = "thingTypeId"
            case thingTypeMetadata = "thingTypeMetadata"
            case thingTypeName = "thingTypeName"
            case thingTypeProperties = "thingTypeProperties"
        }
    }

    public struct Destination: AWSEncodableShape & AWSDecodableShape {
        /// Describes the location in S3 of the updated firmware.
        public let s3Destination: S3Destination?

        @inlinable
        public init(s3Destination: S3Destination? = nil) {
            self.s3Destination = s3Destination
        }

        public func validate(name: String) throws {
            try self.s3Destination?.validate(name: "\(name).s3Destination")
        }

        private enum CodingKeys: String, CodingKey {
            case s3Destination = "s3Destination"
        }
    }

    public struct DetachPolicyRequest: AWSEncodableShape {
        /// The policy to detach.
        public let policyName: String
        /// The target from which the policy will be detached.
        public let target: String

        @inlinable
        public init(policyName: String, target: String) {
            self.policyName = policyName
            self.target = target
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.policyName, key: "policyName")
            try container.encode(self.target, forKey: .target)
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[\\w+=,.@-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case target = "target"
        }
    }

    public struct DetachPrincipalPolicyRequest: AWSEncodableShape {
        /// The name of the policy to detach.
        public let policyName: String
        /// The principal. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).
        public let principal: String

        @inlinable
        public init(policyName: String, principal: String) {
            self.policyName = policyName
            self.principal = principal
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.policyName, key: "policyName")
            request.encodeHeader(self.principal, key: "x-amzn-iot-principal")
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[\\w+=,.@-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DetachSecurityProfileRequest: AWSEncodableShape {
        /// The security profile that is detached.
        public let securityProfileName: String
        /// The ARN of the thing group from which the security profile is detached.
        public let securityProfileTargetArn: String

        @inlinable
        public init(securityProfileName: String, securityProfileTargetArn: String) {
            self.securityProfileName = securityProfileName
            self.securityProfileTargetArn = securityProfileTargetArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.securityProfileName, key: "securityProfileName")
            request.encodeQuery(self.securityProfileTargetArn, key: "securityProfileTargetArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DetachSecurityProfileResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DetachThingPrincipalRequest: AWSEncodableShape {
        /// If the principal is a certificate, this value must be ARN of the certificate. If
        /// 			the principal is an Amazon Cognito identity, this value must be the ID of the Amazon
        /// 			Cognito identity.
        public let principal: String
        /// The name of the thing.
        public let thingName: String

        @inlinable
        public init(principal: String, thingName: String) {
            self.principal = principal
            self.thingName = thingName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeHeader(self.principal, key: "x-amzn-principal")
            request.encodePath(self.thingName, key: "thingName")
        }

        public func validate(name: String) throws {
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DetachThingPrincipalResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DetectMitigationActionExecution: AWSDecodableShape {
        ///  The friendly name that uniquely identifies the mitigation action.
        public let actionName: String?
        ///  The error code of a mitigation action.
        public let errorCode: String?
        ///  The date a mitigation action ended.
        public let executionEndDate: Date?
        ///  The date a mitigation action was started.
        public let executionStartDate: Date?
        ///  The message of a mitigation action.
        public let message: String?
        ///  The status of a mitigation action.
        public let status: DetectMitigationActionExecutionStatus?
        ///  The unique identifier of the task.
        public let taskId: String?
        ///  The name of the thing.
        public let thingName: String?
        ///  The unique identifier of the violation.
        public let violationId: String?

        @inlinable
        public init(actionName: String? = nil, errorCode: String? = nil, executionEndDate: Date? = nil, executionStartDate: Date? = nil, message: String? = nil, status: DetectMitigationActionExecutionStatus? = nil, taskId: String? = nil, thingName: String? = nil, violationId: String? = nil) {
            self.actionName = actionName
            self.errorCode = errorCode
            self.executionEndDate = executionEndDate
            self.executionStartDate = executionStartDate
            self.message = message
            self.status = status
            self.taskId = taskId
            self.thingName = thingName
            self.violationId = violationId
        }

        private enum CodingKeys: String, CodingKey {
            case actionName = "actionName"
            case errorCode = "errorCode"
            case executionEndDate = "executionEndDate"
            case executionStartDate = "executionStartDate"
            case message = "message"
            case status = "status"
            case taskId = "taskId"
            case thingName = "thingName"
            case violationId = "violationId"
        }
    }

    public struct DetectMitigationActionsTaskStatistics: AWSDecodableShape {
        ///  The actions that were performed.
        public let actionsExecuted: Int64?
        ///  The actions that failed.
        public let actionsFailed: Int64?
        ///  The actions that were skipped.
        public let actionsSkipped: Int64?

        @inlinable
        public init(actionsExecuted: Int64? = nil, actionsFailed: Int64? = nil, actionsSkipped: Int64? = nil) {
            self.actionsExecuted = actionsExecuted
            self.actionsFailed = actionsFailed
            self.actionsSkipped = actionsSkipped
        }

        private enum CodingKeys: String, CodingKey {
            case actionsExecuted = "actionsExecuted"
            case actionsFailed = "actionsFailed"
            case actionsSkipped = "actionsSkipped"
        }
    }

    public struct DetectMitigationActionsTaskSummary: AWSDecodableShape {
        ///  The definition of the actions.
        public let actionsDefinition: [MitigationAction]?
        ///  Includes only active violations.
        public let onlyActiveViolationsIncluded: Bool?
        ///  Includes suppressed alerts.
        public let suppressedAlertsIncluded: Bool?
        ///  Specifies the ML Detect findings to which the mitigation actions are applied.
        public let target: DetectMitigationActionsTaskTarget?
        ///  The date the task ended.
        public let taskEndTime: Date?
        ///  The unique identifier of the task.
        public let taskId: String?
        ///  The date the task started.
        public let taskStartTime: Date?
        ///  The statistics of a mitigation action task.
        public let taskStatistics: DetectMitigationActionsTaskStatistics?
        ///  The status of the task.
        public let taskStatus: DetectMitigationActionsTaskStatus?
        ///  Specifies the time period of which violation events occurred between.
        public let violationEventOccurrenceRange: ViolationEventOccurrenceRange?

        @inlinable
        public init(actionsDefinition: [MitigationAction]? = nil, onlyActiveViolationsIncluded: Bool? = nil, suppressedAlertsIncluded: Bool? = nil, target: DetectMitigationActionsTaskTarget? = nil, taskEndTime: Date? = nil, taskId: String? = nil, taskStartTime: Date? = nil, taskStatistics: DetectMitigationActionsTaskStatistics? = nil, taskStatus: DetectMitigationActionsTaskStatus? = nil, violationEventOccurrenceRange: ViolationEventOccurrenceRange? = nil) {
            self.actionsDefinition = actionsDefinition
            self.onlyActiveViolationsIncluded = onlyActiveViolationsIncluded
            self.suppressedAlertsIncluded = suppressedAlertsIncluded
            self.target = target
            self.taskEndTime = taskEndTime
            self.taskId = taskId
            self.taskStartTime = taskStartTime
            self.taskStatistics = taskStatistics
            self.taskStatus = taskStatus
            self.violationEventOccurrenceRange = violationEventOccurrenceRange
        }

        private enum CodingKeys: String, CodingKey {
            case actionsDefinition = "actionsDefinition"
            case onlyActiveViolationsIncluded = "onlyActiveViolationsIncluded"
            case suppressedAlertsIncluded = "suppressedAlertsIncluded"
            case target = "target"
            case taskEndTime = "taskEndTime"
            case taskId = "taskId"
            case taskStartTime = "taskStartTime"
            case taskStatistics = "taskStatistics"
            case taskStatus = "taskStatus"
            case violationEventOccurrenceRange = "violationEventOccurrenceRange"
        }
    }

    public struct DetectMitigationActionsTaskTarget: AWSEncodableShape & AWSDecodableShape {
        ///  The name of the behavior.
        public let behaviorName: String?
        ///  The name of the security profile.
        public let securityProfileName: String?
        ///  The unique identifiers of the violations.
        public let violationIds: [String]?

        @inlinable
        public init(behaviorName: String? = nil, securityProfileName: String? = nil, violationIds: [String]? = nil) {
            self.behaviorName = behaviorName
            self.securityProfileName = securityProfileName
            self.violationIds = violationIds
        }

        public func validate(name: String) throws {
            try self.validate(self.behaviorName, name: "behaviorName", parent: name, max: 128)
            try self.validate(self.behaviorName, name: "behaviorName", parent: name, min: 1)
            try self.validate(self.behaviorName, name: "behaviorName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.violationIds?.forEach {
                try validate($0, name: "violationIds[]", parent: name, max: 128)
                try validate($0, name: "violationIds[]", parent: name, min: 1)
                try validate($0, name: "violationIds[]", parent: name, pattern: "^[a-zA-Z0-9\\-]+$")
            }
            try self.validate(self.violationIds, name: "violationIds", parent: name, max: 25)
            try self.validate(self.violationIds, name: "violationIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case behaviorName = "behaviorName"
            case securityProfileName = "securityProfileName"
            case violationIds = "violationIds"
        }
    }

    public struct DisableTopicRuleRequest: AWSEncodableShape {
        /// The name of the rule to disable.
        public let ruleName: String

        @inlinable
        public init(ruleName: String) {
            self.ruleName = ruleName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.ruleName, key: "ruleName")
        }

        public func validate(name: String) throws {
            try self.validate(self.ruleName, name: "ruleName", parent: name, max: 128)
            try self.validate(self.ruleName, name: "ruleName", parent: name, min: 1)
            try self.validate(self.ruleName, name: "ruleName", parent: name, pattern: "^[a-zA-Z0-9_]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DisassociateSbomFromPackageVersionRequest: AWSEncodableShape {
        /// A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required.
        public let clientToken: String?
        /// The name of the new software package.
        public let packageName: String
        /// The name of the new package version.
        public let versionName: String

        @inlinable
        public init(clientToken: String? = DisassociateSbomFromPackageVersionRequest.idempotencyToken(), packageName: String, versionName: String) {
            self.clientToken = clientToken
            self.packageName = packageName
            self.versionName = versionName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.clientToken, key: "clientToken")
            request.encodePath(self.packageName, key: "packageName")
            request.encodePath(self.versionName, key: "versionName")
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 36)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^\\S{36,64}$")
            try self.validate(self.packageName, name: "packageName", parent: name, max: 128)
            try self.validate(self.packageName, name: "packageName", parent: name, min: 1)
            try self.validate(self.packageName, name: "packageName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
            try self.validate(self.versionName, name: "versionName", parent: name, max: 64)
            try self.validate(self.versionName, name: "versionName", parent: name, min: 1)
            try self.validate(self.versionName, name: "versionName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DisassociateSbomFromPackageVersionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DocumentParameter: AWSDecodableShape {
        /// Description of the map field containing the patterns that need to be replaced in a managed template job document schema.
        public let description: String?
        /// An example illustrating a pattern that need to be replaced in a managed template job document schema.
        public let example: String?
        /// Key of the map field containing the patterns that need to be replaced in a managed template job document schema.
        public let key: String?
        /// Specifies whether a pattern that needs to be replaced in a managed template job document schema is optional or required.
        public let optional: Bool?
        /// A regular expression of the patterns that need to be replaced in a managed template job document schema.
        public let regex: String?

        @inlinable
        public init(description: String? = nil, example: String? = nil, key: String? = nil, optional: Bool? = nil, regex: String? = nil) {
            self.description = description
            self.example = example
            self.key = key
            self.optional = optional
            self.regex = regex
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case example = "example"
            case key = "key"
            case optional = "optional"
            case regex = "regex"
        }
    }

    public struct DomainConfigurationSummary: AWSDecodableShape {
        /// The ARN of the domain configuration.
        public let domainConfigurationArn: String?
        /// The name of the domain configuration. This value must be unique to a region.
        public let domainConfigurationName: String?
        /// The type of service delivered by the endpoint.
        public let serviceType: ServiceType?

        @inlinable
        public init(domainConfigurationArn: String? = nil, domainConfigurationName: String? = nil, serviceType: ServiceType? = nil) {
            self.domainConfigurationArn = domainConfigurationArn
            self.domainConfigurationName = domainConfigurationName
            self.serviceType = serviceType
        }

        private enum CodingKeys: String, CodingKey {
            case domainConfigurationArn = "domainConfigurationArn"
            case domainConfigurationName = "domainConfigurationName"
            case serviceType = "serviceType"
        }
    }

    public struct DynamoDBAction: AWSEncodableShape & AWSDecodableShape {
        /// The hash key name.
        public let hashKeyField: String
        /// The hash key type. Valid values are "STRING" or "NUMBER"
        public let hashKeyType: DynamoKeyType?
        /// The hash key value.
        public let hashKeyValue: String
        /// The type of operation to be performed. This follows the substitution template, so it can be ${operation}, but the substitution must result in one of the following: INSERT, UPDATE, or DELETE.
        public let operation: String?
        /// The action payload. This name can be customized.
        public let payloadField: String?
        /// The range key name.
        public let rangeKeyField: String?
        /// The range key type. Valid values are "STRING" or "NUMBER"
        public let rangeKeyType: DynamoKeyType?
        /// The range key value.
        public let rangeKeyValue: String?
        /// The ARN of the IAM role that grants access to the DynamoDB table.
        public let roleArn: String
        /// The name of the DynamoDB table.
        public let tableName: String

        @inlinable
        public init(hashKeyField: String, hashKeyType: DynamoKeyType? = nil, hashKeyValue: String, operation: String? = nil, payloadField: String? = nil, rangeKeyField: String? = nil, rangeKeyType: DynamoKeyType? = nil, rangeKeyValue: String? = nil, roleArn: String, tableName: String) {
            self.hashKeyField = hashKeyField
            self.hashKeyType = hashKeyType
            self.hashKeyValue = hashKeyValue
            self.operation = operation
            self.payloadField = payloadField
            self.rangeKeyField = rangeKeyField
            self.rangeKeyType = rangeKeyType
            self.rangeKeyValue = rangeKeyValue
            self.roleArn = roleArn
            self.tableName = tableName
        }

        private enum CodingKeys: String, CodingKey {
            case hashKeyField = "hashKeyField"
            case hashKeyType = "hashKeyType"
            case hashKeyValue = "hashKeyValue"
            case operation = "operation"
            case payloadField = "payloadField"
            case rangeKeyField = "rangeKeyField"
            case rangeKeyType = "rangeKeyType"
            case rangeKeyValue = "rangeKeyValue"
            case roleArn = "roleArn"
            case tableName = "tableName"
        }
    }

    public struct DynamoDBv2Action: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the DynamoDB table to which the message data will be written. For example:  { "dynamoDBv2": { "roleArn": "aws:iam:12341251:my-role" "putItem": { "tableName": "my-table" } } }  Each attribute in the message payload will be written to a separate column in the DynamoDB database.
        public let putItem: PutItemInput
        /// The ARN of the IAM role that grants access to the DynamoDB table.
        public let roleArn: String

        @inlinable
        public init(putItem: PutItemInput, roleArn: String) {
            self.putItem = putItem
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case putItem = "putItem"
            case roleArn = "roleArn"
        }
    }

    public struct EffectivePolicy: AWSDecodableShape {
        /// The policy ARN.
        public let policyArn: String?
        /// The IAM policy document.
        public let policyDocument: String?
        /// The policy name.
        public let policyName: String?

        @inlinable
        public init(policyArn: String? = nil, policyDocument: String? = nil, policyName: String? = nil) {
            self.policyArn = policyArn
            self.policyDocument = policyDocument
            self.policyName = policyName
        }

        private enum CodingKeys: String, CodingKey {
            case policyArn = "policyArn"
            case policyDocument = "policyDocument"
            case policyName = "policyName"
        }
    }

    public struct ElasticsearchAction: AWSEncodableShape & AWSDecodableShape {
        /// The endpoint of your OpenSearch domain.
        public let endpoint: String
        /// The unique identifier for the document you are storing.
        public let id: String
        /// The index where you want to store your data.
        public let index: String
        /// The IAM role ARN that has access to OpenSearch.
        public let roleArn: String
        /// The type of document you are storing.
        public let type: String

        @inlinable
        public init(endpoint: String, id: String, index: String, roleArn: String, type: String) {
            self.endpoint = endpoint
            self.id = id
            self.index = index
            self.roleArn = roleArn
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.endpoint, name: "endpoint", parent: name, pattern: "^https?://")
        }

        private enum CodingKeys: String, CodingKey {
            case endpoint = "endpoint"
            case id = "id"
            case index = "index"
            case roleArn = "roleArn"
            case type = "type"
        }
    }

    public struct EnableIoTLoggingParams: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the type of information to be logged.
        public let logLevel: LogLevel
        /// The Amazon Resource Name (ARN) of the IAM role used for logging.
        public let roleArnForLogging: String

        @inlinable
        public init(logLevel: LogLevel, roleArnForLogging: String) {
            self.logLevel = logLevel
            self.roleArnForLogging = roleArnForLogging
        }

        public func validate(name: String) throws {
            try self.validate(self.roleArnForLogging, name: "roleArnForLogging", parent: name, max: 2048)
            try self.validate(self.roleArnForLogging, name: "roleArnForLogging", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case logLevel = "logLevel"
            case roleArnForLogging = "roleArnForLogging"
        }
    }

    public struct EnableTopicRuleRequest: AWSEncodableShape {
        /// The name of the topic rule to enable.
        public let ruleName: String

        @inlinable
        public init(ruleName: String) {
            self.ruleName = ruleName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.ruleName, key: "ruleName")
        }

        public func validate(name: String) throws {
            try self.validate(self.ruleName, name: "ruleName", parent: name, max: 128)
            try self.validate(self.ruleName, name: "ruleName", parent: name, min: 1)
            try self.validate(self.ruleName, name: "ruleName", parent: name, pattern: "^[a-zA-Z0-9_]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ErrorInfo: AWSDecodableShape {
        /// The error code.
        public let code: String?
        /// The error message.
        public let message: String?

        @inlinable
        public init(code: String? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "code"
            case message = "message"
        }
    }

    public struct ExplicitDeny: AWSDecodableShape {
        /// The policies that denied the authorization.
        public let policies: [Policy]?

        @inlinable
        public init(policies: [Policy]? = nil) {
            self.policies = policies
        }

        private enum CodingKeys: String, CodingKey {
            case policies = "policies"
        }
    }

    public struct ExponentialRolloutRate: AWSEncodableShape & AWSDecodableShape {
        /// The minimum number of things that will be notified of a pending job, per minute at the start of job rollout. This parameter allows you to define the initial rate of rollout.
        public let baseRatePerMinute: Int
        /// The exponential factor to increase the rate of rollout for a job. Amazon Web Services IoT Core supports up to one digit after the decimal (for example, 1.5, but not 1.55).
        public let incrementFactor: Double
        /// The criteria to initiate the increase in rate of rollout for a job.
        public let rateIncreaseCriteria: RateIncreaseCriteria

        @inlinable
        public init(baseRatePerMinute: Int, incrementFactor: Double, rateIncreaseCriteria: RateIncreaseCriteria) {
            self.baseRatePerMinute = baseRatePerMinute
            self.incrementFactor = incrementFactor
            self.rateIncreaseCriteria = rateIncreaseCriteria
        }

        public func validate(name: String) throws {
            try self.validate(self.baseRatePerMinute, name: "baseRatePerMinute", parent: name, max: 1000)
            try self.validate(self.baseRatePerMinute, name: "baseRatePerMinute", parent: name, min: 1)
            try self.validate(self.incrementFactor, name: "incrementFactor", parent: name, max: 5.0)
            try self.validate(self.incrementFactor, name: "incrementFactor", parent: name, min: 1.1)
            try self.rateIncreaseCriteria.validate(name: "\(name).rateIncreaseCriteria")
        }

        private enum CodingKeys: String, CodingKey {
            case baseRatePerMinute = "baseRatePerMinute"
            case incrementFactor = "incrementFactor"
            case rateIncreaseCriteria = "rateIncreaseCriteria"
        }
    }

    public struct Field: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field.
        public let name: String?
        /// The data type of the field.
        public let type: FieldType?

        @inlinable
        public init(name: String? = nil, type: FieldType? = nil) {
            self.name = name
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case type = "type"
        }
    }

    public struct FileLocation: AWSEncodableShape & AWSDecodableShape {
        /// The location of the updated firmware in S3.
        public let s3Location: S3Location?
        /// The stream that contains the OTA update.
        public let stream: Stream?

        @inlinable
        public init(s3Location: S3Location? = nil, stream: Stream? = nil) {
            self.s3Location = s3Location
            self.stream = stream
        }

        public func validate(name: String) throws {
            try self.s3Location?.validate(name: "\(name).s3Location")
            try self.stream?.validate(name: "\(name).stream")
        }

        private enum CodingKeys: String, CodingKey {
            case s3Location = "s3Location"
            case stream = "stream"
        }
    }

    public struct FirehoseAction: AWSEncodableShape & AWSDecodableShape {
        /// Whether to deliver the Kinesis Data Firehose stream as a batch by using  PutRecordBatch .  The default value is false. When batchMode is true and the rule's SQL statement evaluates to an Array, each Array element forms one record in the  PutRecordBatch request. The resulting array can't have more than 500 records.
        public let batchMode: Bool?
        /// The delivery stream name.
        public let deliveryStreamName: String
        /// The IAM role that grants access to the Amazon Kinesis Firehose stream.
        public let roleArn: String
        /// A character separator that will be used to separate records written to the Firehose stream. Valid values are: '\n' (newline), '\t' (tab), '\r\n' (Windows newline), ',' (comma).
        public let separator: String?

        @inlinable
        public init(batchMode: Bool? = nil, deliveryStreamName: String, roleArn: String, separator: String? = nil) {
            self.batchMode = batchMode
            self.deliveryStreamName = deliveryStreamName
            self.roleArn = roleArn
            self.separator = separator
        }

        public func validate(name: String) throws {
            try self.validate(self.separator, name: "separator", parent: name, pattern: "^([\\n\\t])|(\\r\\n)|(,)$")
        }

        private enum CodingKeys: String, CodingKey {
            case batchMode = "batchMode"
            case deliveryStreamName = "deliveryStreamName"
            case roleArn = "roleArn"
            case separator = "separator"
        }
    }

    public struct FleetMetricNameAndArn: AWSDecodableShape {
        /// The fleet metric ARN.
        public let metricArn: String?
        /// The fleet metric name.
        public let metricName: String?

        @inlinable
        public init(metricArn: String? = nil, metricName: String? = nil) {
            self.metricArn = metricArn
            self.metricName = metricName
        }

        private enum CodingKeys: String, CodingKey {
            case metricArn = "metricArn"
            case metricName = "metricName"
        }
    }

    public struct GeoLocationTarget: AWSEncodableShape & AWSDecodableShape {
        /// The name of the geolocation target field. If the target field is part of a named shadow, you must select the named shadow using the namedShadow filter.
        public let name: String?
        /// The order of the geolocation target field. This field is optional. The default value is LatLon.
        public let order: TargetFieldOrder?

        @inlinable
        public init(name: String? = nil, order: TargetFieldOrder? = nil) {
            self.name = name
            self.order = order
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case order = "order"
        }
    }

    public struct GetBehaviorModelTrainingSummariesRequest: AWSEncodableShape {
        ///  The maximum number of results to return at one time. The default is 10.
        public let maxResults: Int?
        ///  The token for the next set of results.
        public let nextToken: String?
        ///  The name of the security profile.
        public let securityProfileName: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, securityProfileName: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.securityProfileName = securityProfileName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.securityProfileName, key: "securityProfileName")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 10)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetBehaviorModelTrainingSummariesResponse: AWSDecodableShape {
        ///  A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        ///  A list of all ML Detect behaviors and their model status for a given Security Profile.
        public let summaries: [BehaviorModelTrainingSummary]?

        @inlinable
        public init(nextToken: String? = nil, summaries: [BehaviorModelTrainingSummary]? = nil) {
            self.nextToken = nextToken
            self.summaries = summaries
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case summaries = "summaries"
        }
    }

    public struct GetBucketsAggregationRequest: AWSEncodableShape {
        /// The aggregation field.
        public let aggregationField: String
        /// The basic control of the response shape and the bucket aggregation type to perform.
        public let bucketsAggregationType: BucketsAggregationType
        /// The name of the index to search.
        public let indexName: String?
        /// The search query string.
        public let queryString: String
        /// The version of the query.
        public let queryVersion: String?

        @inlinable
        public init(aggregationField: String, bucketsAggregationType: BucketsAggregationType, indexName: String? = nil, queryString: String, queryVersion: String? = nil) {
            self.aggregationField = aggregationField
            self.bucketsAggregationType = bucketsAggregationType
            self.indexName = indexName
            self.queryString = queryString
            self.queryVersion = queryVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.aggregationField, name: "aggregationField", parent: name, min: 1)
            try self.bucketsAggregationType.validate(name: "\(name).bucketsAggregationType")
            try self.validate(self.indexName, name: "indexName", parent: name, max: 128)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case aggregationField = "aggregationField"
            case bucketsAggregationType = "bucketsAggregationType"
            case indexName = "indexName"
            case queryString = "queryString"
            case queryVersion = "queryVersion"
        }
    }

    public struct GetBucketsAggregationResponse: AWSDecodableShape {
        /// The main part of the response with a list of buckets. Each bucket contains a keyValue and a count.  keyValue: The aggregation field value counted for the particular bucket.  count: The number of documents that have that value.
        public let buckets: [Bucket]?
        /// The total number of things that fit the query string criteria.
        public let totalCount: Int?

        @inlinable
        public init(buckets: [Bucket]? = nil, totalCount: Int? = nil) {
            self.buckets = buckets
            self.totalCount = totalCount
        }

        private enum CodingKeys: String, CodingKey {
            case buckets = "buckets"
            case totalCount = "totalCount"
        }
    }

    public struct GetCardinalityRequest: AWSEncodableShape {
        /// The field to aggregate.
        public let aggregationField: String?
        /// The name of the index to search.
        public let indexName: String?
        /// The search query string.
        public let queryString: String
        /// The query version.
        public let queryVersion: String?

        @inlinable
        public init(aggregationField: String? = nil, indexName: String? = nil, queryString: String, queryVersion: String? = nil) {
            self.aggregationField = aggregationField
            self.indexName = indexName
            self.queryString = queryString
            self.queryVersion = queryVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.aggregationField, name: "aggregationField", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, max: 128)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case aggregationField = "aggregationField"
            case indexName = "indexName"
            case queryString = "queryString"
            case queryVersion = "queryVersion"
        }
    }

    public struct GetCardinalityResponse: AWSDecodableShape {
        /// The approximate count of unique values that match the query.
        public let cardinality: Int?

        @inlinable
        public init(cardinality: Int? = nil) {
            self.cardinality = cardinality
        }

        private enum CodingKeys: String, CodingKey {
            case cardinality = "cardinality"
        }
    }

    public struct GetCommandExecutionRequest: AWSEncodableShape {
        /// The unique identifier for the command execution. This information is returned as a response of the StartCommandExecution API request.
        public let executionId: String
        /// Can be used to specify whether to include the result of the command execution in the GetCommandExecution API response. Your device can use this field to provide additional information about the command execution. You only need to specify this field when using the AWS-IoT namespace.
        public let includeResult: Bool?
        /// The Amazon Resource Number (ARN) of the device on which the command execution is being performed.
        public let targetArn: String

        @inlinable
        public init(executionId: String, includeResult: Bool? = nil, targetArn: String) {
            self.executionId = executionId
            self.includeResult = includeResult
            self.targetArn = targetArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.executionId, key: "executionId")
            request.encodeQuery(self.includeResult, key: "includeResult")
            request.encodeQuery(self.targetArn, key: "targetArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.executionId, name: "executionId", parent: name, max: 64)
            try self.validate(self.executionId, name: "executionId", parent: name, min: 1)
            try self.validate(self.executionId, name: "executionId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.targetArn, name: "targetArn", parent: name, max: 2048)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetCommandExecutionResponse: AWSDecodableShape {
        /// The Amazon Resource Number (ARN) of the command. For example, arn:aws:iot:::command/
        public let commandArn: String?
        /// The timestamp, when the command execution was completed.
        public let completedAt: Date?
        /// The timestamp, when the command execution was created.
        public let createdAt: Date?
        /// The unique identifier of the command execution.
        public let executionId: String?
        /// Specifies the amount of time in seconds that the device can take to finish a command execution. A timer starts when the command execution is created. If the command execution status is not set to another terminal state before the timer expires, it will automatically update to TIMED_OUT.
        public let executionTimeoutSeconds: Int64?
        /// The timestamp, when the command execution was last updated.
        public let lastUpdatedAt: Date?
        /// The list of parameters that the StartCommandExecution API used when performing the command on the device.
        public let parameters: [String: CommandParameterValue]?
        /// The result value for the current state of the command execution. The status provides information about the progress of the command execution. The device can use the result field to share additional details about the execution such as a return value of a remote function call.  If you use the AWS-IoT-FleetWise namespace, then this field is not applicable in the API response.
        public let result: [String: CommandExecutionResult]?
        /// The timestamp, when the command execution was started.
        public let startedAt: Date?
        /// The status of the command execution. After your devices receive the command and start performing the operations specified in the command, it can use the UpdateCommandExecution MQTT API to update the status information.
        public let status: CommandExecutionStatus?
        /// Your devices can use this parameter to provide additional context about the status of a command execution using a reason code and description.
        public let statusReason: StatusReason?
        /// The Amazon Resource Number (ARN) of the device on which the command execution is being performed.
        public let targetArn: String?
        /// The time to live (TTL) parameter that indicates the duration for which executions will be retained in your account. The default value is six months.
        public let timeToLive: Date?

        @inlinable
        public init(commandArn: String? = nil, completedAt: Date? = nil, createdAt: Date? = nil, executionId: String? = nil, executionTimeoutSeconds: Int64? = nil, lastUpdatedAt: Date? = nil, parameters: [String: CommandParameterValue]? = nil, result: [String: CommandExecutionResult]? = nil, startedAt: Date? = nil, status: CommandExecutionStatus? = nil, statusReason: StatusReason? = nil, targetArn: String? = nil, timeToLive: Date? = nil) {
            self.commandArn = commandArn
            self.completedAt = completedAt
            self.createdAt = createdAt
            self.executionId = executionId
            self.executionTimeoutSeconds = executionTimeoutSeconds
            self.lastUpdatedAt = lastUpdatedAt
            self.parameters = parameters
            self.result = result
            self.startedAt = startedAt
            self.status = status
            self.statusReason = statusReason
            self.targetArn = targetArn
            self.timeToLive = timeToLive
        }

        private enum CodingKeys: String, CodingKey {
            case commandArn = "commandArn"
            case completedAt = "completedAt"
            case createdAt = "createdAt"
            case executionId = "executionId"
            case executionTimeoutSeconds = "executionTimeoutSeconds"
            case lastUpdatedAt = "lastUpdatedAt"
            case parameters = "parameters"
            case result = "result"
            case startedAt = "startedAt"
            case status = "status"
            case statusReason = "statusReason"
            case targetArn = "targetArn"
            case timeToLive = "timeToLive"
        }
    }

    public struct GetCommandRequest: AWSEncodableShape {
        /// The unique identifier of the command for which you want to retrieve information.
        public let commandId: String

        @inlinable
        public init(commandId: String) {
            self.commandId = commandId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.commandId, key: "commandId")
        }

        public func validate(name: String) throws {
            try self.validate(self.commandId, name: "commandId", parent: name, max: 64)
            try self.validate(self.commandId, name: "commandId", parent: name, min: 1)
            try self.validate(self.commandId, name: "commandId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetCommandResponse: AWSDecodableShape {
        /// The Amazon Resource Number (ARN) of the command. For example, arn:aws:iot:::command/
        public let commandArn: String?
        /// The unique identifier of the command.
        public let commandId: String?
        /// The timestamp, when the command was created.
        public let createdAt: Date?
        /// Indicates whether the command has been deprecated.
        public let deprecated: Bool?
        /// A short text description of the command.
        public let description: String?
        /// The user-friendly name in the console for the command.
        public let displayName: String?
        /// The timestamp, when the command was last updated.
        public let lastUpdatedAt: Date?
        /// A list of parameters for the command created.
        public let mandatoryParameters: [CommandParameter]?
        /// The namespace of the command.
        public let namespace: CommandNamespace?
        /// The payload object that you provided for the command.
        public let payload: CommandPayload?
        /// Indicates whether the command is being deleted.
        public let pendingDeletion: Bool?
        /// The IAM role that you provided when creating the command with AWS-IoT-FleetWise as the namespace.
        public let roleArn: String?

        @inlinable
        public init(commandArn: String? = nil, commandId: String? = nil, createdAt: Date? = nil, deprecated: Bool? = nil, description: String? = nil, displayName: String? = nil, lastUpdatedAt: Date? = nil, mandatoryParameters: [CommandParameter]? = nil, namespace: CommandNamespace? = nil, payload: CommandPayload? = nil, pendingDeletion: Bool? = nil, roleArn: String? = nil) {
            self.commandArn = commandArn
            self.commandId = commandId
            self.createdAt = createdAt
            self.deprecated = deprecated
            self.description = description
            self.displayName = displayName
            self.lastUpdatedAt = lastUpdatedAt
            self.mandatoryParameters = mandatoryParameters
            self.namespace = namespace
            self.payload = payload
            self.pendingDeletion = pendingDeletion
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case commandArn = "commandArn"
            case commandId = "commandId"
            case createdAt = "createdAt"
            case deprecated = "deprecated"
            case description = "description"
            case displayName = "displayName"
            case lastUpdatedAt = "lastUpdatedAt"
            case mandatoryParameters = "mandatoryParameters"
            case namespace = "namespace"
            case payload = "payload"
            case pendingDeletion = "pendingDeletion"
            case roleArn = "roleArn"
        }
    }

    public struct GetEffectivePoliciesRequest: AWSEncodableShape {
        /// The Cognito identity pool ID.
        public let cognitoIdentityPoolId: String?
        /// The principal. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).
        public let principal: String?
        /// The thing name.
        public let thingName: String?

        @inlinable
        public init(cognitoIdentityPoolId: String? = nil, principal: String? = nil, thingName: String? = nil) {
            self.cognitoIdentityPoolId = cognitoIdentityPoolId
            self.principal = principal
            self.thingName = thingName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.cognitoIdentityPoolId, forKey: .cognitoIdentityPoolId)
            try container.encodeIfPresent(self.principal, forKey: .principal)
            request.encodeQuery(self.thingName, key: "thingName")
        }

        public func validate(name: String) throws {
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case cognitoIdentityPoolId = "cognitoIdentityPoolId"
            case principal = "principal"
        }
    }

    public struct GetEffectivePoliciesResponse: AWSDecodableShape {
        /// The effective policies.
        public let effectivePolicies: [EffectivePolicy]?

        @inlinable
        public init(effectivePolicies: [EffectivePolicy]? = nil) {
            self.effectivePolicies = effectivePolicies
        }

        private enum CodingKeys: String, CodingKey {
            case effectivePolicies = "effectivePolicies"
        }
    }

    public struct GetIndexingConfigurationRequest: AWSEncodableShape {
        public init() {}
    }

    public struct GetIndexingConfigurationResponse: AWSDecodableShape {
        /// The index configuration.
        public let thingGroupIndexingConfiguration: ThingGroupIndexingConfiguration?
        /// Thing indexing configuration.
        public let thingIndexingConfiguration: ThingIndexingConfiguration?

        @inlinable
        public init(thingGroupIndexingConfiguration: ThingGroupIndexingConfiguration? = nil, thingIndexingConfiguration: ThingIndexingConfiguration? = nil) {
            self.thingGroupIndexingConfiguration = thingGroupIndexingConfiguration
            self.thingIndexingConfiguration = thingIndexingConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case thingGroupIndexingConfiguration = "thingGroupIndexingConfiguration"
            case thingIndexingConfiguration = "thingIndexingConfiguration"
        }
    }

    public struct GetJobDocumentRequest: AWSEncodableShape {
        /// Provides a view of the job document before and after the substitution parameters have been resolved with their exact values.
        public let beforeSubstitution: Bool?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String

        @inlinable
        public init(beforeSubstitution: Bool? = nil, jobId: String) {
            self.beforeSubstitution = beforeSubstitution
            self.jobId = jobId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.beforeSubstitution, key: "beforeSubstitution")
            request.encodePath(self.jobId, key: "jobId")
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetJobDocumentResponse: AWSDecodableShape {
        /// The job document content.
        public let document: String?

        @inlinable
        public init(document: String? = nil) {
            self.document = document
        }

        private enum CodingKeys: String, CodingKey {
            case document = "document"
        }
    }

    public struct GetLoggingOptionsRequest: AWSEncodableShape {
        public init() {}
    }

    public struct GetLoggingOptionsResponse: AWSDecodableShape {
        /// The logging level.
        public let logLevel: LogLevel?
        /// The ARN of the IAM role that grants access.
        public let roleArn: String?

        @inlinable
        public init(logLevel: LogLevel? = nil, roleArn: String? = nil) {
            self.logLevel = logLevel
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case logLevel = "logLevel"
            case roleArn = "roleArn"
        }
    }

    public struct GetOTAUpdateRequest: AWSEncodableShape {
        /// The OTA update ID.
        public let otaUpdateId: String

        @inlinable
        public init(otaUpdateId: String) {
            self.otaUpdateId = otaUpdateId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.otaUpdateId, key: "otaUpdateId")
        }

        public func validate(name: String) throws {
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, max: 128)
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, min: 1)
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetOTAUpdateResponse: AWSDecodableShape {
        /// The OTA update info.
        public let otaUpdateInfo: OTAUpdateInfo?

        @inlinable
        public init(otaUpdateInfo: OTAUpdateInfo? = nil) {
            self.otaUpdateInfo = otaUpdateInfo
        }

        private enum CodingKeys: String, CodingKey {
            case otaUpdateInfo = "otaUpdateInfo"
        }
    }

    public struct GetPackageConfigurationRequest: AWSEncodableShape {
        public init() {}
    }

    public struct GetPackageConfigurationResponse: AWSDecodableShape {
        /// The version that is associated to a specific job.
        public let versionUpdateByJobsConfig: VersionUpdateByJobsConfig?

        @inlinable
        public init(versionUpdateByJobsConfig: VersionUpdateByJobsConfig? = nil) {
            self.versionUpdateByJobsConfig = versionUpdateByJobsConfig
        }

        private enum CodingKeys: String, CodingKey {
            case versionUpdateByJobsConfig = "versionUpdateByJobsConfig"
        }
    }

    public struct GetPackageRequest: AWSEncodableShape {
        /// The name of the target software package.
        public let packageName: String

        @inlinable
        public init(packageName: String) {
            self.packageName = packageName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.packageName, key: "packageName")
        }

        public func validate(name: String) throws {
            try self.validate(self.packageName, name: "packageName", parent: name, max: 128)
            try self.validate(self.packageName, name: "packageName", parent: name, min: 1)
            try self.validate(self.packageName, name: "packageName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetPackageResponse: AWSDecodableShape {
        /// The date the package was created.
        public let creationDate: Date?
        /// The name of the default package version.
        public let defaultVersionName: String?
        /// The package description.
        public let description: String?
        /// The date when the package was last updated.
        public let lastModifiedDate: Date?
        /// The ARN for the package.
        public let packageArn: String?
        /// The name of the software package.
        public let packageName: String?

        @inlinable
        public init(creationDate: Date? = nil, defaultVersionName: String? = nil, description: String? = nil, lastModifiedDate: Date? = nil, packageArn: String? = nil, packageName: String? = nil) {
            self.creationDate = creationDate
            self.defaultVersionName = defaultVersionName
            self.description = description
            self.lastModifiedDate = lastModifiedDate
            self.packageArn = packageArn
            self.packageName = packageName
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
            case defaultVersionName = "defaultVersionName"
            case description = "description"
            case lastModifiedDate = "lastModifiedDate"
            case packageArn = "packageArn"
            case packageName = "packageName"
        }
    }

    public struct GetPackageVersionRequest: AWSEncodableShape {
        /// The name of the associated package.
        public let packageName: String
        /// The name of the target package version.
        public let versionName: String

        @inlinable
        public init(packageName: String, versionName: String) {
            self.packageName = packageName
            self.versionName = versionName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.packageName, key: "packageName")
            request.encodePath(self.versionName, key: "versionName")
        }

        public func validate(name: String) throws {
            try self.validate(self.packageName, name: "packageName", parent: name, max: 128)
            try self.validate(self.packageName, name: "packageName", parent: name, min: 1)
            try self.validate(self.packageName, name: "packageName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
            try self.validate(self.versionName, name: "versionName", parent: name, max: 64)
            try self.validate(self.versionName, name: "versionName", parent: name, min: 1)
            try self.validate(self.versionName, name: "versionName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetPackageVersionResponse: AWSDecodableShape {
        /// The various components that make up a software package version.
        public let artifact: PackageVersionArtifact?
        /// Metadata that were added to the package version that can be used to define a package version’s configuration.
        public let attributes: [String: String]?
        /// The date when the package version was created.
        public let creationDate: Date?
        /// The package version description.
        public let description: String?
        /// Error reason for a package version failure during creation or update.
        public let errorReason: String?
        /// The date when the package version was last updated.
        public let lastModifiedDate: Date?
        /// The name of the software package.
        public let packageName: String?
        /// The ARN for the package version.
        public let packageVersionArn: String?
        /// The inline job document associated with a software package version used for a quick job deployment.
        public let recipe: String?
        /// The software bill of materials for a software package version.
        public let sbom: Sbom?
        /// The status of the validation for a new software bill of materials added to a software package version.
        public let sbomValidationStatus: SbomValidationStatus?
        /// The status associated to the package version. For more information, see Package version lifecycle.
        public let status: PackageVersionStatus?
        /// The name of the package version.
        public let versionName: String?

        @inlinable
        public init(artifact: PackageVersionArtifact? = nil, attributes: [String: String]? = nil, creationDate: Date? = nil, description: String? = nil, errorReason: String? = nil, lastModifiedDate: Date? = nil, packageName: String? = nil, packageVersionArn: String? = nil, recipe: String? = nil, sbom: Sbom? = nil, sbomValidationStatus: SbomValidationStatus? = nil, status: PackageVersionStatus? = nil, versionName: String? = nil) {
            self.artifact = artifact
            self.attributes = attributes
            self.creationDate = creationDate
            self.description = description
            self.errorReason = errorReason
            self.lastModifiedDate = lastModifiedDate
            self.packageName = packageName
            self.packageVersionArn = packageVersionArn
            self.recipe = recipe
            self.sbom = sbom
            self.sbomValidationStatus = sbomValidationStatus
            self.status = status
            self.versionName = versionName
        }

        private enum CodingKeys: String, CodingKey {
            case artifact = "artifact"
            case attributes = "attributes"
            case creationDate = "creationDate"
            case description = "description"
            case errorReason = "errorReason"
            case lastModifiedDate = "lastModifiedDate"
            case packageName = "packageName"
            case packageVersionArn = "packageVersionArn"
            case recipe = "recipe"
            case sbom = "sbom"
            case sbomValidationStatus = "sbomValidationStatus"
            case status = "status"
            case versionName = "versionName"
        }
    }

    public struct GetPercentilesRequest: AWSEncodableShape {
        /// The field to aggregate.
        public let aggregationField: String?
        /// The name of the index to search.
        public let indexName: String?
        /// The percentile groups returned.
        public let percents: [Double]?
        /// The search query string.
        public let queryString: String
        /// The query version.
        public let queryVersion: String?

        @inlinable
        public init(aggregationField: String? = nil, indexName: String? = nil, percents: [Double]? = nil, queryString: String, queryVersion: String? = nil) {
            self.aggregationField = aggregationField
            self.indexName = indexName
            self.percents = percents
            self.queryString = queryString
            self.queryVersion = queryVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.aggregationField, name: "aggregationField", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, max: 128)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.percents?.forEach {
                try validate($0, name: "percents[]", parent: name, max: 100.0)
                try validate($0, name: "percents[]", parent: name, min: 0.0)
            }
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case aggregationField = "aggregationField"
            case indexName = "indexName"
            case percents = "percents"
            case queryString = "queryString"
            case queryVersion = "queryVersion"
        }
    }

    public struct GetPercentilesResponse: AWSDecodableShape {
        /// The percentile values of the aggregated fields.
        public let percentiles: [PercentPair]?

        @inlinable
        public init(percentiles: [PercentPair]? = nil) {
            self.percentiles = percentiles
        }

        private enum CodingKeys: String, CodingKey {
            case percentiles = "percentiles"
        }
    }

    public struct GetPolicyRequest: AWSEncodableShape {
        /// The name of the policy.
        public let policyName: String

        @inlinable
        public init(policyName: String) {
            self.policyName = policyName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.policyName, key: "policyName")
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[\\w+=,.@-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetPolicyResponse: AWSDecodableShape {
        /// The date the policy was created.
        public let creationDate: Date?
        /// The default policy version ID.
        public let defaultVersionId: String?
        /// The generation ID of the policy.
        public let generationId: String?
        /// The date the policy was last modified.
        public let lastModifiedDate: Date?
        /// The policy ARN.
        public let policyArn: String?
        /// The JSON document that describes the policy.
        public let policyDocument: String?
        /// The policy name.
        public let policyName: String?

        @inlinable
        public init(creationDate: Date? = nil, defaultVersionId: String? = nil, generationId: String? = nil, lastModifiedDate: Date? = nil, policyArn: String? = nil, policyDocument: String? = nil, policyName: String? = nil) {
            self.creationDate = creationDate
            self.defaultVersionId = defaultVersionId
            self.generationId = generationId
            self.lastModifiedDate = lastModifiedDate
            self.policyArn = policyArn
            self.policyDocument = policyDocument
            self.policyName = policyName
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
            case defaultVersionId = "defaultVersionId"
            case generationId = "generationId"
            case lastModifiedDate = "lastModifiedDate"
            case policyArn = "policyArn"
            case policyDocument = "policyDocument"
            case policyName = "policyName"
        }
    }

    public struct GetPolicyVersionRequest: AWSEncodableShape {
        /// The name of the policy.
        public let policyName: String
        /// The policy version ID.
        public let policyVersionId: String

        @inlinable
        public init(policyName: String, policyVersionId: String) {
            self.policyName = policyName
            self.policyVersionId = policyVersionId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.policyName, key: "policyName")
            request.encodePath(self.policyVersionId, key: "policyVersionId")
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[\\w+=,.@-]+$")
            try self.validate(self.policyVersionId, name: "policyVersionId", parent: name, pattern: "^[0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetPolicyVersionResponse: AWSDecodableShape {
        /// The date the policy was created.
        public let creationDate: Date?
        /// The generation ID of the policy version.
        public let generationId: String?
        /// Specifies whether the policy version is the default.
        public let isDefaultVersion: Bool?
        /// The date the policy was last modified.
        public let lastModifiedDate: Date?
        /// The policy ARN.
        public let policyArn: String?
        /// The JSON document that describes the policy.
        public let policyDocument: String?
        /// The policy name.
        public let policyName: String?
        /// The policy version ID.
        public let policyVersionId: String?

        @inlinable
        public init(creationDate: Date? = nil, generationId: String? = nil, isDefaultVersion: Bool? = nil, lastModifiedDate: Date? = nil, policyArn: String? = nil, policyDocument: String? = nil, policyName: String? = nil, policyVersionId: String? = nil) {
            self.creationDate = creationDate
            self.generationId = generationId
            self.isDefaultVersion = isDefaultVersion
            self.lastModifiedDate = lastModifiedDate
            self.policyArn = policyArn
            self.policyDocument = policyDocument
            self.policyName = policyName
            self.policyVersionId = policyVersionId
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
            case generationId = "generationId"
            case isDefaultVersion = "isDefaultVersion"
            case lastModifiedDate = "lastModifiedDate"
            case policyArn = "policyArn"
            case policyDocument = "policyDocument"
            case policyName = "policyName"
            case policyVersionId = "policyVersionId"
        }
    }

    public struct GetRegistrationCodeRequest: AWSEncodableShape {
        public init() {}
    }

    public struct GetRegistrationCodeResponse: AWSDecodableShape {
        /// The CA certificate registration code.
        public let registrationCode: String?

        @inlinable
        public init(registrationCode: String? = nil) {
            self.registrationCode = registrationCode
        }

        private enum CodingKeys: String, CodingKey {
            case registrationCode = "registrationCode"
        }
    }

    public struct GetStatisticsRequest: AWSEncodableShape {
        /// The aggregation field name.
        public let aggregationField: String?
        /// The name of the index to search. The default value is AWS_Things.
        public let indexName: String?
        /// The query used to search. You can specify "*" for the query string to get the count of all indexed things in your Amazon Web Services account.
        public let queryString: String
        /// The version of the query used to search.
        public let queryVersion: String?

        @inlinable
        public init(aggregationField: String? = nil, indexName: String? = nil, queryString: String, queryVersion: String? = nil) {
            self.aggregationField = aggregationField
            self.indexName = indexName
            self.queryString = queryString
            self.queryVersion = queryVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.aggregationField, name: "aggregationField", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, max: 128)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case aggregationField = "aggregationField"
            case indexName = "indexName"
            case queryString = "queryString"
            case queryVersion = "queryVersion"
        }
    }

    public struct GetStatisticsResponse: AWSDecodableShape {
        /// The statistics returned by the Fleet Indexing service based on the query and aggregation field.
        public let statistics: Statistics?

        @inlinable
        public init(statistics: Statistics? = nil) {
            self.statistics = statistics
        }

        private enum CodingKeys: String, CodingKey {
            case statistics = "statistics"
        }
    }

    public struct GetThingConnectivityDataRequest: AWSEncodableShape {
        /// The name of your IoT thing.
        public let thingName: String

        @inlinable
        public init(thingName: String) {
            self.thingName = thingName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.thingName, key: "thingName")
        }

        public func validate(name: String) throws {
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetThingConnectivityDataResponse: AWSDecodableShape {
        /// A Boolean that indicates the connectivity status.
        public let connected: Bool?
        /// The reason why the client is disconnecting.
        public let disconnectReason: DisconnectReasonValue?
        /// The name of your IoT thing.
        public let thingName: String?
        /// The timestamp of when the event occurred.
        public let timestamp: Date?

        @inlinable
        public init(connected: Bool? = nil, disconnectReason: DisconnectReasonValue? = nil, thingName: String? = nil, timestamp: Date? = nil) {
            self.connected = connected
            self.disconnectReason = disconnectReason
            self.thingName = thingName
            self.timestamp = timestamp
        }

        private enum CodingKeys: String, CodingKey {
            case connected = "connected"
            case disconnectReason = "disconnectReason"
            case thingName = "thingName"
            case timestamp = "timestamp"
        }
    }

    public struct GetTopicRuleDestinationRequest: AWSEncodableShape {
        /// The ARN of the topic rule destination.
        public let arn: String

        @inlinable
        public init(arn: String) {
            self.arn = arn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.arn, key: "arn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetTopicRuleDestinationResponse: AWSDecodableShape {
        /// The topic rule destination.
        public let topicRuleDestination: TopicRuleDestination?

        @inlinable
        public init(topicRuleDestination: TopicRuleDestination? = nil) {
            self.topicRuleDestination = topicRuleDestination
        }

        private enum CodingKeys: String, CodingKey {
            case topicRuleDestination = "topicRuleDestination"
        }
    }

    public struct GetTopicRuleRequest: AWSEncodableShape {
        /// The name of the rule.
        public let ruleName: String

        @inlinable
        public init(ruleName: String) {
            self.ruleName = ruleName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.ruleName, key: "ruleName")
        }

        public func validate(name: String) throws {
            try self.validate(self.ruleName, name: "ruleName", parent: name, max: 128)
            try self.validate(self.ruleName, name: "ruleName", parent: name, min: 1)
            try self.validate(self.ruleName, name: "ruleName", parent: name, pattern: "^[a-zA-Z0-9_]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetTopicRuleResponse: AWSDecodableShape {
        /// The rule.
        public let rule: TopicRule?
        /// The rule ARN.
        public let ruleArn: String?

        @inlinable
        public init(rule: TopicRule? = nil, ruleArn: String? = nil) {
            self.rule = rule
            self.ruleArn = ruleArn
        }

        private enum CodingKeys: String, CodingKey {
            case rule = "rule"
            case ruleArn = "ruleArn"
        }
    }

    public struct GetV2LoggingOptionsRequest: AWSEncodableShape {
        public init() {}
    }

    public struct GetV2LoggingOptionsResponse: AWSDecodableShape {
        /// The default log level.
        public let defaultLogLevel: LogLevel?
        /// Disables all logs.
        public let disableAllLogs: Bool?
        /// The IAM role ARN IoT uses to write to your CloudWatch logs.
        public let roleArn: String?

        @inlinable
        public init(defaultLogLevel: LogLevel? = nil, disableAllLogs: Bool? = nil, roleArn: String? = nil) {
            self.defaultLogLevel = defaultLogLevel
            self.disableAllLogs = disableAllLogs
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case defaultLogLevel = "defaultLogLevel"
            case disableAllLogs = "disableAllLogs"
            case roleArn = "roleArn"
        }
    }

    public struct GroupNameAndArn: AWSDecodableShape {
        /// The group ARN.
        public let groupArn: String?
        /// The group name.
        public let groupName: String?

        @inlinable
        public init(groupArn: String? = nil, groupName: String? = nil) {
            self.groupArn = groupArn
            self.groupName = groupName
        }

        private enum CodingKeys: String, CodingKey {
            case groupArn = "groupArn"
            case groupName = "groupName"
        }
    }

    public struct HttpAction: AWSEncodableShape & AWSDecodableShape {
        /// The authentication method to use when sending data to an HTTPS endpoint.
        public let auth: HttpAuthorization?
        /// The URL to which IoT sends a confirmation message. The value of the confirmation URL must be a prefix of the endpoint URL. If you do not specify a confirmation URL IoT uses the endpoint URL as the confirmation URL. If you use substitution templates in the confirmationUrl, you must create and enable topic rule destinations that match each possible value of the substitution template before traffic is allowed to your endpoint URL.
        public let confirmationUrl: String?
        /// The HTTP headers to send with the message data.
        public let headers: [HttpActionHeader]?
        /// The endpoint URL. If substitution templates are used in the URL, you must also specify a confirmationUrl. If this is a new destination, a new TopicRuleDestination is created if possible.
        public let url: String

        @inlinable
        public init(auth: HttpAuthorization? = nil, confirmationUrl: String? = nil, headers: [HttpActionHeader]? = nil, url: String) {
            self.auth = auth
            self.confirmationUrl = confirmationUrl
            self.headers = headers
            self.url = url
        }

        public func validate(name: String) throws {
            try self.validate(self.confirmationUrl, name: "confirmationUrl", parent: name, max: 2000)
            try self.headers?.forEach {
                try $0.validate(name: "\(name).headers[]")
            }
            try self.validate(self.headers, name: "headers", parent: name, max: 100)
            try self.validate(self.url, name: "url", parent: name, max: 2000)
        }

        private enum CodingKeys: String, CodingKey {
            case auth = "auth"
            case confirmationUrl = "confirmationUrl"
            case headers = "headers"
            case url = "url"
        }
    }

    public struct HttpActionHeader: AWSEncodableShape & AWSDecodableShape {
        /// The HTTP header key.
        public let key: String
        /// The HTTP header value. Substitution templates are supported.
        public let value: String

        @inlinable
        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 256)
            try self.validate(self.key, name: "key", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "key"
            case value = "value"
        }
    }

    public struct HttpAuthorization: AWSEncodableShape & AWSDecodableShape {
        /// Use Sig V4 authorization. For more information, see Signature Version 4 Signing Process.
        public let sigv4: SigV4Authorization?

        @inlinable
        public init(sigv4: SigV4Authorization? = nil) {
            self.sigv4 = sigv4
        }

        private enum CodingKeys: String, CodingKey {
            case sigv4 = "sigv4"
        }
    }

    public struct HttpContext: AWSEncodableShape {
        /// The header keys and values in an HTTP authorization request.
        public let headers: [String: String]?
        /// The query string keys and values in an HTTP authorization request.
        public let queryString: String?

        @inlinable
        public init(headers: [String: String]? = nil, queryString: String? = nil) {
            self.headers = headers
            self.queryString = queryString
        }

        public func validate(name: String) throws {
            try self.headers?.forEach {
                try validate($0.key, name: "headers.key", parent: name, max: 8192)
                try validate($0.key, name: "headers.key", parent: name, min: 1)
                try validate($0.key, name: "headers.key", parent: name, pattern: "^[\\s\\S]*$")
                try validate($0.value, name: "headers[\"\($0.key)\"]", parent: name, max: 8192)
                try validate($0.value, name: "headers[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "headers[\"\($0.key)\"]", parent: name, pattern: "^[\\s\\S]*$")
            }
            try self.validate(self.queryString, name: "queryString", parent: name, max: 4096)
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
            try self.validate(self.queryString, name: "queryString", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case headers = "headers"
            case queryString = "queryString"
        }
    }

    public struct HttpUrlDestinationConfiguration: AWSEncodableShape {
        /// The URL IoT uses to confirm ownership of or access to the topic rule destination URL.
        public let confirmationUrl: String

        @inlinable
        public init(confirmationUrl: String) {
            self.confirmationUrl = confirmationUrl
        }

        public func validate(name: String) throws {
            try self.validate(self.confirmationUrl, name: "confirmationUrl", parent: name, max: 2000)
        }

        private enum CodingKeys: String, CodingKey {
            case confirmationUrl = "confirmationUrl"
        }
    }

    public struct HttpUrlDestinationProperties: AWSDecodableShape {
        /// The URL used to confirm the HTTP topic rule destination URL.
        public let confirmationUrl: String?

        @inlinable
        public init(confirmationUrl: String? = nil) {
            self.confirmationUrl = confirmationUrl
        }

        private enum CodingKeys: String, CodingKey {
            case confirmationUrl = "confirmationUrl"
        }
    }

    public struct HttpUrlDestinationSummary: AWSDecodableShape {
        /// The URL used to confirm ownership of or access to the HTTP topic rule destination URL.
        public let confirmationUrl: String?

        @inlinable
        public init(confirmationUrl: String? = nil) {
            self.confirmationUrl = confirmationUrl
        }

        private enum CodingKeys: String, CodingKey {
            case confirmationUrl = "confirmationUrl"
        }
    }

    public struct ImplicitDeny: AWSDecodableShape {
        /// Policies that don't contain a matching allow or deny statement for the specified action on the specified resource.
        public let policies: [Policy]?

        @inlinable
        public init(policies: [Policy]? = nil) {
            self.policies = policies
        }

        private enum CodingKeys: String, CodingKey {
            case policies = "policies"
        }
    }

    public struct IndexingFilter: AWSEncodableShape & AWSDecodableShape {
        /// The list of geolocation targets that you select to index. The default maximum number of geolocation targets for indexing is 1. To increase the limit, see Amazon Web Services IoT Device Management Quotas in the Amazon Web Services General Reference.
        public let geoLocations: [GeoLocationTarget]?
        /// The shadow names that you select to index. The default maximum number of shadow names for indexing is 10. To increase  the limit, see Amazon Web Services IoT Device Management  Quotas in the Amazon Web Services General Reference.
        public let namedShadowNames: [String]?

        @inlinable
        public init(geoLocations: [GeoLocationTarget]? = nil, namedShadowNames: [String]? = nil) {
            self.geoLocations = geoLocations
            self.namedShadowNames = namedShadowNames
        }

        public func validate(name: String) throws {
            try self.namedShadowNames?.forEach {
                try validate($0, name: "namedShadowNames[]", parent: name, max: 64)
                try validate($0, name: "namedShadowNames[]", parent: name, min: 1)
                try validate($0, name: "namedShadowNames[]", parent: name, pattern: "^[$a-zA-Z0-9:_-]+$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case geoLocations = "geoLocations"
            case namedShadowNames = "namedShadowNames"
        }
    }

    public struct IotAnalyticsAction: AWSEncodableShape & AWSDecodableShape {
        /// Whether to process the action as a batch. The default value is false. When batchMode is true and the rule SQL statement evaluates to an Array, each Array element is delivered as a separate message when passed by  BatchPutMessage to the IoT Analytics channel. The resulting array can't have more than 100 messages.
        public let batchMode: Bool?
        /// (deprecated) The ARN of the IoT Analytics channel to which message data will be sent.
        public let channelArn: String?
        /// The name of the IoT Analytics channel to which message data will be sent.
        public let channelName: String?
        /// The ARN of the role which has a policy that grants IoT Analytics permission to send message data via IoT Analytics (iotanalytics:BatchPutMessage).
        public let roleArn: String?

        @inlinable
        public init(batchMode: Bool? = nil, channelArn: String? = nil, channelName: String? = nil, roleArn: String? = nil) {
            self.batchMode = batchMode
            self.channelArn = channelArn
            self.channelName = channelName
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case batchMode = "batchMode"
            case channelArn = "channelArn"
            case channelName = "channelName"
            case roleArn = "roleArn"
        }
    }

    public struct IotEventsAction: AWSEncodableShape & AWSDecodableShape {
        /// Whether to process the event actions as a batch. The default value is false. When batchMode is true, you can't specify a messageId.  When batchMode is true and the rule SQL statement evaluates to an Array, each Array element is treated as a separate message when it's sent to IoT Events by calling  BatchPutMessage .  The resulting array can't have more than 10 messages.
        public let batchMode: Bool?
        /// The name of the IoT Events input.
        public let inputName: String
        /// The ID of the message. The default messageId is a new UUID value. When batchMode is true, you can't specify a messageId--a new UUID value will be assigned. Assign a value to this property to ensure that only one input (message) with a given messageId will be processed by an IoT Events detector.
        public let messageId: String?
        /// The ARN of the role that grants IoT permission to send an input to an IoT Events detector. ("Action":"iotevents:BatchPutMessage").
        public let roleArn: String

        @inlinable
        public init(batchMode: Bool? = nil, inputName: String, messageId: String? = nil, roleArn: String) {
            self.batchMode = batchMode
            self.inputName = inputName
            self.messageId = messageId
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.inputName, name: "inputName", parent: name, max: 128)
            try self.validate(self.inputName, name: "inputName", parent: name, min: 1)
            try self.validate(self.messageId, name: "messageId", parent: name, max: 128)
        }

        private enum CodingKeys: String, CodingKey {
            case batchMode = "batchMode"
            case inputName = "inputName"
            case messageId = "messageId"
            case roleArn = "roleArn"
        }
    }

    public struct IotSiteWiseAction: AWSEncodableShape & AWSDecodableShape {
        /// A list of asset property value entries.
        public let putAssetPropertyValueEntries: [PutAssetPropertyValueEntry]
        /// The ARN of the role that grants IoT permission to send an asset property value to IoT SiteWise. ("Action": "iotsitewise:BatchPutAssetPropertyValue"). The trust policy can restrict access to specific asset hierarchy paths.
        public let roleArn: String

        @inlinable
        public init(putAssetPropertyValueEntries: [PutAssetPropertyValueEntry], roleArn: String) {
            self.putAssetPropertyValueEntries = putAssetPropertyValueEntries
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.putAssetPropertyValueEntries.forEach {
                try $0.validate(name: "\(name).putAssetPropertyValueEntries[]")
            }
            try self.validate(self.putAssetPropertyValueEntries, name: "putAssetPropertyValueEntries", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case putAssetPropertyValueEntries = "putAssetPropertyValueEntries"
            case roleArn = "roleArn"
        }
    }

    public struct IssuerCertificateIdentifier: AWSEncodableShape & AWSDecodableShape {
        /// The issuer certificate serial number.
        public let issuerCertificateSerialNumber: String?
        /// The subject of the issuer certificate.
        public let issuerCertificateSubject: String?
        /// The issuer ID.
        public let issuerId: String?

        @inlinable
        public init(issuerCertificateSerialNumber: String? = nil, issuerCertificateSubject: String? = nil, issuerId: String? = nil) {
            self.issuerCertificateSerialNumber = issuerCertificateSerialNumber
            self.issuerCertificateSubject = issuerCertificateSubject
            self.issuerId = issuerId
        }

        public func validate(name: String) throws {
            try self.validate(self.issuerCertificateSerialNumber, name: "issuerCertificateSerialNumber", parent: name, max: 20)
            try self.validate(self.issuerCertificateSerialNumber, name: "issuerCertificateSerialNumber", parent: name, pattern: "^[a-fA-F0-9:]+$")
            try self.validate(self.issuerCertificateSubject, name: "issuerCertificateSubject", parent: name, max: 1000)
            try self.validate(self.issuerCertificateSubject, name: "issuerCertificateSubject", parent: name, pattern: "^[\\p{Graph}\\x20]*$")
            try self.validate(self.issuerId, name: "issuerId", parent: name, max: 64)
            try self.validate(self.issuerId, name: "issuerId", parent: name, pattern: "^(0x)?[a-fA-F0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case issuerCertificateSerialNumber = "issuerCertificateSerialNumber"
            case issuerCertificateSubject = "issuerCertificateSubject"
            case issuerId = "issuerId"
        }
    }

    public struct Job: AWSDecodableShape {
        /// Configuration for criteria to abort the job.
        public let abortConfig: AbortConfig?
        /// If the job was updated, describes the reason for the update.
        public let comment: String?
        /// The time, in seconds since the epoch, when the job was completed.
        public let completedAt: Date?
        /// The time, in seconds since the epoch, when the job was created.
        public let createdAt: Date?
        /// A short text description of the job.
        public let description: String?
        /// The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.The package version must be in either the Published or Deprecated state when the job deploys. For more information, see Package version lifecycle.  Note:The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.
        public let destinationPackageVersions: [String]?
        /// A key-value map that pairs the patterns that need to be replaced in a managed template job document schema. You can use the description of each key as a guidance to specify the inputs during runtime when creating a job.   documentParameters can only be used when creating jobs from Amazon Web Services managed templates. This parameter can't be used with custom job templates or to create jobs from them.
        public let documentParameters: [String: String]?
        /// Will be true if the job was canceled with the optional force parameter set to true.
        public let forceCanceled: Bool?
        /// Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling previously created executions, otherwise false.
        public let isConcurrent: Bool?
        /// An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId".
        public let jobArn: String?
        /// The configuration for the criteria to retry the job.
        public let jobExecutionsRetryConfig: JobExecutionsRetryConfig?
        /// Allows you to create a staged rollout of a job.
        public let jobExecutionsRolloutConfig: JobExecutionsRolloutConfig?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String?
        /// Details about the job process.
        public let jobProcessDetails: JobProcessDetails?
        /// The ARN of the job template used to create the job.
        public let jobTemplateArn: String?
        /// The time, in seconds since the epoch, when the job was last updated.
        public let lastUpdatedAt: Date?
        /// The namespace used to indicate that a job is a customer-managed job. When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.  $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/   The namespaceId feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.
        public let namespaceId: String?
        /// Configuration for pre-signed S3 URLs.
        public let presignedUrlConfig: PresignedUrlConfig?
        /// If the job was updated, provides the reason code for the update.
        public let reasonCode: String?
        /// Displays the next seven maintenance window occurrences and their start times.
        public let scheduledJobRollouts: [ScheduledJobRollout]?
        /// The configuration that allows you to schedule a job for a future date and time in addition to specifying the end behavior for each job execution.
        public let schedulingConfig: SchedulingConfig?
        /// The status of the job, one of IN_PROGRESS, CANCELED, DELETION_IN_PROGRESS or COMPLETED.
        public let status: JobStatus?
        /// A list of IoT things and thing groups to which the job should be sent.
        public let targets: [String]?
        /// Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a device when the thing representing the device is added to a target group, even after the job was completed by all things originally in the group.   We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.
        public let targetSelection: TargetSelection?
        /// Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to IN_PROGRESS. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set to TIMED_OUT.
        public let timeoutConfig: TimeoutConfig?

        @inlinable
        public init(abortConfig: AbortConfig? = nil, comment: String? = nil, completedAt: Date? = nil, createdAt: Date? = nil, description: String? = nil, destinationPackageVersions: [String]? = nil, documentParameters: [String: String]? = nil, forceCanceled: Bool? = nil, isConcurrent: Bool? = nil, jobArn: String? = nil, jobExecutionsRetryConfig: JobExecutionsRetryConfig? = nil, jobExecutionsRolloutConfig: JobExecutionsRolloutConfig? = nil, jobId: String? = nil, jobProcessDetails: JobProcessDetails? = nil, jobTemplateArn: String? = nil, lastUpdatedAt: Date? = nil, namespaceId: String? = nil, presignedUrlConfig: PresignedUrlConfig? = nil, reasonCode: String? = nil, scheduledJobRollouts: [ScheduledJobRollout]? = nil, schedulingConfig: SchedulingConfig? = nil, status: JobStatus? = nil, targets: [String]? = nil, targetSelection: TargetSelection? = nil, timeoutConfig: TimeoutConfig? = nil) {
            self.abortConfig = abortConfig
            self.comment = comment
            self.completedAt = completedAt
            self.createdAt = createdAt
            self.description = description
            self.destinationPackageVersions = destinationPackageVersions
            self.documentParameters = documentParameters
            self.forceCanceled = forceCanceled
            self.isConcurrent = isConcurrent
            self.jobArn = jobArn
            self.jobExecutionsRetryConfig = jobExecutionsRetryConfig
            self.jobExecutionsRolloutConfig = jobExecutionsRolloutConfig
            self.jobId = jobId
            self.jobProcessDetails = jobProcessDetails
            self.jobTemplateArn = jobTemplateArn
            self.lastUpdatedAt = lastUpdatedAt
            self.namespaceId = namespaceId
            self.presignedUrlConfig = presignedUrlConfig
            self.reasonCode = reasonCode
            self.scheduledJobRollouts = scheduledJobRollouts
            self.schedulingConfig = schedulingConfig
            self.status = status
            self.targets = targets
            self.targetSelection = targetSelection
            self.timeoutConfig = timeoutConfig
        }

        private enum CodingKeys: String, CodingKey {
            case abortConfig = "abortConfig"
            case comment = "comment"
            case completedAt = "completedAt"
            case createdAt = "createdAt"
            case description = "description"
            case destinationPackageVersions = "destinationPackageVersions"
            case documentParameters = "documentParameters"
            case forceCanceled = "forceCanceled"
            case isConcurrent = "isConcurrent"
            case jobArn = "jobArn"
            case jobExecutionsRetryConfig = "jobExecutionsRetryConfig"
            case jobExecutionsRolloutConfig = "jobExecutionsRolloutConfig"
            case jobId = "jobId"
            case jobProcessDetails = "jobProcessDetails"
            case jobTemplateArn = "jobTemplateArn"
            case lastUpdatedAt = "lastUpdatedAt"
            case namespaceId = "namespaceId"
            case presignedUrlConfig = "presignedUrlConfig"
            case reasonCode = "reasonCode"
            case scheduledJobRollouts = "scheduledJobRollouts"
            case schedulingConfig = "schedulingConfig"
            case status = "status"
            case targets = "targets"
            case targetSelection = "targetSelection"
            case timeoutConfig = "timeoutConfig"
        }
    }

    public struct JobExecution: AWSDecodableShape {
        /// The estimated number of seconds that remain before the job execution status will be changed to TIMED_OUT. The timeout interval can be anywhere between 1 minute and 7 days (1 to 10080 minutes). The actual job execution timeout can occur up to 60 seconds later than the estimated duration. This value will not be included if the job execution has reached a terminal status.
        public let approximateSecondsBeforeTimedOut: Int64?
        /// A string (consisting of the digits "0" through "9") which identifies this particular job execution on this particular device. It can be used in commands which return or update job execution information.
        public let executionNumber: Int64?
        /// Will be true if the job execution was canceled with the optional force parameter set to true.
        public let forceCanceled: Bool?
        /// The unique identifier you assigned to the job when it was created.
        public let jobId: String?
        /// The time, in seconds since the epoch, when the job execution was last updated.
        public let lastUpdatedAt: Date?
        /// The time, in seconds since the epoch, when the job execution was queued.
        public let queuedAt: Date?
        /// The time, in seconds since the epoch, when the job execution started.
        public let startedAt: Date?
        /// The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, TIMED_OUT, CANCELED, or REJECTED).
        public let status: JobExecutionStatus?
        /// A collection of name/value pairs that describe the status of the job execution.
        public let statusDetails: JobExecutionStatusDetails?
        /// The ARN of the thing on which the job execution is running.
        public let thingArn: String?
        /// The version of the job execution. Job execution versions are incremented each time they are updated by a device.
        public let versionNumber: Int64?

        @inlinable
        public init(approximateSecondsBeforeTimedOut: Int64? = nil, executionNumber: Int64? = nil, forceCanceled: Bool? = nil, jobId: String? = nil, lastUpdatedAt: Date? = nil, queuedAt: Date? = nil, startedAt: Date? = nil, status: JobExecutionStatus? = nil, statusDetails: JobExecutionStatusDetails? = nil, thingArn: String? = nil, versionNumber: Int64? = nil) {
            self.approximateSecondsBeforeTimedOut = approximateSecondsBeforeTimedOut
            self.executionNumber = executionNumber
            self.forceCanceled = forceCanceled
            self.jobId = jobId
            self.lastUpdatedAt = lastUpdatedAt
            self.queuedAt = queuedAt
            self.startedAt = startedAt
            self.status = status
            self.statusDetails = statusDetails
            self.thingArn = thingArn
            self.versionNumber = versionNumber
        }

        private enum CodingKeys: String, CodingKey {
            case approximateSecondsBeforeTimedOut = "approximateSecondsBeforeTimedOut"
            case executionNumber = "executionNumber"
            case forceCanceled = "forceCanceled"
            case jobId = "jobId"
            case lastUpdatedAt = "lastUpdatedAt"
            case queuedAt = "queuedAt"
            case startedAt = "startedAt"
            case status = "status"
            case statusDetails = "statusDetails"
            case thingArn = "thingArn"
            case versionNumber = "versionNumber"
        }
    }

    public struct JobExecutionStatusDetails: AWSDecodableShape {
        /// The job execution status.
        public let detailsMap: [String: String]?

        @inlinable
        public init(detailsMap: [String: String]? = nil) {
            self.detailsMap = detailsMap
        }

        private enum CodingKeys: String, CodingKey {
            case detailsMap = "detailsMap"
        }
    }

    public struct JobExecutionSummary: AWSDecodableShape {
        /// A string (consisting of the digits "0" through "9") which identifies this particular job execution on this particular device. It can be used later in commands which return or update job execution information.
        public let executionNumber: Int64?
        /// The time, in seconds since the epoch, when the job execution was last updated.
        public let lastUpdatedAt: Date?
        /// The time, in seconds since the epoch, when the job execution was queued.
        public let queuedAt: Date?
        /// The number that indicates how many retry attempts have been completed for this job on this device.
        public let retryAttempt: Int?
        /// The time, in seconds since the epoch, when the job execution started.
        public let startedAt: Date?
        /// The status of the job execution.
        public let status: JobExecutionStatus?

        @inlinable
        public init(executionNumber: Int64? = nil, lastUpdatedAt: Date? = nil, queuedAt: Date? = nil, retryAttempt: Int? = nil, startedAt: Date? = nil, status: JobExecutionStatus? = nil) {
            self.executionNumber = executionNumber
            self.lastUpdatedAt = lastUpdatedAt
            self.queuedAt = queuedAt
            self.retryAttempt = retryAttempt
            self.startedAt = startedAt
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case executionNumber = "executionNumber"
            case lastUpdatedAt = "lastUpdatedAt"
            case queuedAt = "queuedAt"
            case retryAttempt = "retryAttempt"
            case startedAt = "startedAt"
            case status = "status"
        }
    }

    public struct JobExecutionSummaryForJob: AWSDecodableShape {
        /// Contains a subset of information about a job execution.
        public let jobExecutionSummary: JobExecutionSummary?
        /// The ARN of the thing on which the job execution is running.
        public let thingArn: String?

        @inlinable
        public init(jobExecutionSummary: JobExecutionSummary? = nil, thingArn: String? = nil) {
            self.jobExecutionSummary = jobExecutionSummary
            self.thingArn = thingArn
        }

        private enum CodingKeys: String, CodingKey {
            case jobExecutionSummary = "jobExecutionSummary"
            case thingArn = "thingArn"
        }
    }

    public struct JobExecutionSummaryForThing: AWSDecodableShape {
        /// Contains a subset of information about a job execution.
        public let jobExecutionSummary: JobExecutionSummary?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String?

        @inlinable
        public init(jobExecutionSummary: JobExecutionSummary? = nil, jobId: String? = nil) {
            self.jobExecutionSummary = jobExecutionSummary
            self.jobId = jobId
        }

        private enum CodingKeys: String, CodingKey {
            case jobExecutionSummary = "jobExecutionSummary"
            case jobId = "jobId"
        }
    }

    public struct JobExecutionsRetryConfig: AWSEncodableShape & AWSDecodableShape {
        /// The list of criteria that determines how many retries are allowed for each failure type for a job.
        public let criteriaList: [RetryCriteria]

        @inlinable
        public init(criteriaList: [RetryCriteria]) {
            self.criteriaList = criteriaList
        }

        public func validate(name: String) throws {
            try self.criteriaList.forEach {
                try $0.validate(name: "\(name).criteriaList[]")
            }
            try self.validate(self.criteriaList, name: "criteriaList", parent: name, max: 2)
            try self.validate(self.criteriaList, name: "criteriaList", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case criteriaList = "criteriaList"
        }
    }

    public struct JobExecutionsRolloutConfig: AWSEncodableShape & AWSDecodableShape {
        /// The rate of increase for a job rollout. This parameter allows you to define an exponential rate for a job rollout.
        public let exponentialRate: ExponentialRolloutRate?
        /// The maximum number of things that will be notified of a pending job, per minute. This parameter allows you to create a staged rollout.
        public let maximumPerMinute: Int?

        @inlinable
        public init(exponentialRate: ExponentialRolloutRate? = nil, maximumPerMinute: Int? = nil) {
            self.exponentialRate = exponentialRate
            self.maximumPerMinute = maximumPerMinute
        }

        public func validate(name: String) throws {
            try self.exponentialRate?.validate(name: "\(name).exponentialRate")
            try self.validate(self.maximumPerMinute, name: "maximumPerMinute", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case exponentialRate = "exponentialRate"
            case maximumPerMinute = "maximumPerMinute"
        }
    }

    public struct JobProcessDetails: AWSDecodableShape {
        /// The number of things that cancelled the job.
        public let numberOfCanceledThings: Int?
        /// The number of things that failed executing the job.
        public let numberOfFailedThings: Int?
        /// The number of things currently executing the job.
        public let numberOfInProgressThings: Int?
        /// The number of things that are awaiting execution of the job.
        public let numberOfQueuedThings: Int?
        /// The number of things that rejected the job.
        public let numberOfRejectedThings: Int?
        /// The number of things that are no longer scheduled to execute the job because they have been deleted or have been removed from the group that was a target of the job.
        public let numberOfRemovedThings: Int?
        /// The number of things which successfully completed the job.
        public let numberOfSucceededThings: Int?
        /// The number of things whose job execution status is TIMED_OUT.
        public let numberOfTimedOutThings: Int?
        /// The target devices to which the job execution is being rolled out. This value will be null after the job execution has finished rolling out to all the target devices.
        public let processingTargets: [String]?

        @inlinable
        public init(numberOfCanceledThings: Int? = nil, numberOfFailedThings: Int? = nil, numberOfInProgressThings: Int? = nil, numberOfQueuedThings: Int? = nil, numberOfRejectedThings: Int? = nil, numberOfRemovedThings: Int? = nil, numberOfSucceededThings: Int? = nil, numberOfTimedOutThings: Int? = nil, processingTargets: [String]? = nil) {
            self.numberOfCanceledThings = numberOfCanceledThings
            self.numberOfFailedThings = numberOfFailedThings
            self.numberOfInProgressThings = numberOfInProgressThings
            self.numberOfQueuedThings = numberOfQueuedThings
            self.numberOfRejectedThings = numberOfRejectedThings
            self.numberOfRemovedThings = numberOfRemovedThings
            self.numberOfSucceededThings = numberOfSucceededThings
            self.numberOfTimedOutThings = numberOfTimedOutThings
            self.processingTargets = processingTargets
        }

        private enum CodingKeys: String, CodingKey {
            case numberOfCanceledThings = "numberOfCanceledThings"
            case numberOfFailedThings = "numberOfFailedThings"
            case numberOfInProgressThings = "numberOfInProgressThings"
            case numberOfQueuedThings = "numberOfQueuedThings"
            case numberOfRejectedThings = "numberOfRejectedThings"
            case numberOfRemovedThings = "numberOfRemovedThings"
            case numberOfSucceededThings = "numberOfSucceededThings"
            case numberOfTimedOutThings = "numberOfTimedOutThings"
            case processingTargets = "processingTargets"
        }
    }

    public struct JobSummary: AWSDecodableShape {
        /// The time, in seconds since the epoch, when the job completed.
        public let completedAt: Date?
        /// The time, in seconds since the epoch, when the job was created.
        public let createdAt: Date?
        /// Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling previously created executions, otherwise false.
        public let isConcurrent: Bool?
        /// The job ARN.
        public let jobArn: String?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String?
        /// The time, in seconds since the epoch, when the job was last updated.
        public let lastUpdatedAt: Date?
        /// The job summary status.
        public let status: JobStatus?
        /// Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a thing when the thing is added to a target group, even after the job was completed by all things originally in the group.  We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.
        public let targetSelection: TargetSelection?
        /// The ID of the thing group.
        public let thingGroupId: String?

        @inlinable
        public init(completedAt: Date? = nil, createdAt: Date? = nil, isConcurrent: Bool? = nil, jobArn: String? = nil, jobId: String? = nil, lastUpdatedAt: Date? = nil, status: JobStatus? = nil, targetSelection: TargetSelection? = nil, thingGroupId: String? = nil) {
            self.completedAt = completedAt
            self.createdAt = createdAt
            self.isConcurrent = isConcurrent
            self.jobArn = jobArn
            self.jobId = jobId
            self.lastUpdatedAt = lastUpdatedAt
            self.status = status
            self.targetSelection = targetSelection
            self.thingGroupId = thingGroupId
        }

        private enum CodingKeys: String, CodingKey {
            case completedAt = "completedAt"
            case createdAt = "createdAt"
            case isConcurrent = "isConcurrent"
            case jobArn = "jobArn"
            case jobId = "jobId"
            case lastUpdatedAt = "lastUpdatedAt"
            case status = "status"
            case targetSelection = "targetSelection"
            case thingGroupId = "thingGroupId"
        }
    }

    public struct JobTemplateSummary: AWSDecodableShape {
        /// The time, in seconds since the epoch, when the job template was created.
        public let createdAt: Date?
        /// A description of the job template.
        public let description: String?
        /// The ARN of the job template.
        public let jobTemplateArn: String?
        /// The unique identifier of the job template.
        public let jobTemplateId: String?

        @inlinable
        public init(createdAt: Date? = nil, description: String? = nil, jobTemplateArn: String? = nil, jobTemplateId: String? = nil) {
            self.createdAt = createdAt
            self.description = description
            self.jobTemplateArn = jobTemplateArn
            self.jobTemplateId = jobTemplateId
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "createdAt"
            case description = "description"
            case jobTemplateArn = "jobTemplateArn"
            case jobTemplateId = "jobTemplateId"
        }
    }

    public struct KafkaAction: AWSEncodableShape & AWSDecodableShape {
        /// Properties of the Apache Kafka producer client.
        public let clientProperties: [String: String]
        /// The ARN of Kafka action's VPC TopicRuleDestination.
        public let destinationArn: String
        /// The list of Kafka headers that you specify.
        public let headers: [KafkaActionHeader]?
        /// The Kafka message key.
        public let key: String?
        /// The Kafka message partition.
        public let partition: String?
        /// The Kafka topic for messages to be sent to the Kafka broker.
        public let topic: String

        @inlinable
        public init(clientProperties: [String: String], destinationArn: String, headers: [KafkaActionHeader]? = nil, key: String? = nil, partition: String? = nil, topic: String) {
            self.clientProperties = clientProperties
            self.destinationArn = destinationArn
            self.headers = headers
            self.key = key
            self.partition = partition
            self.topic = topic
        }

        public func validate(name: String) throws {
            try self.headers?.forEach {
                try $0.validate(name: "\(name).headers[]")
            }
            try self.validate(self.headers, name: "headers", parent: name, max: 100)
            try self.validate(self.headers, name: "headers", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientProperties = "clientProperties"
            case destinationArn = "destinationArn"
            case headers = "headers"
            case key = "key"
            case partition = "partition"
            case topic = "topic"
        }
    }

    public struct KafkaActionHeader: AWSEncodableShape & AWSDecodableShape {
        /// The key of the Kafka header.
        public let key: String
        /// The value of the Kafka header.
        public let value: String

        @inlinable
        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 16384)
            try self.validate(self.value, name: "value", parent: name, max: 16384)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "key"
            case value = "value"
        }
    }

    public struct KeyPair: AWSDecodableShape {
        /// The private key.
        public let privateKey: String?
        /// The public key.
        public let publicKey: String?

        @inlinable
        public init(privateKey: String? = nil, publicKey: String? = nil) {
            self.privateKey = privateKey
            self.publicKey = publicKey
        }

        private enum CodingKeys: String, CodingKey {
            case privateKey = "PrivateKey"
            case publicKey = "PublicKey"
        }
    }

    public struct KinesisAction: AWSEncodableShape & AWSDecodableShape {
        /// The partition key.
        public let partitionKey: String?
        /// The ARN of the IAM role that grants access to the Amazon Kinesis stream.
        public let roleArn: String
        /// The name of the Amazon Kinesis stream.
        public let streamName: String

        @inlinable
        public init(partitionKey: String? = nil, roleArn: String, streamName: String) {
            self.partitionKey = partitionKey
            self.roleArn = roleArn
            self.streamName = streamName
        }

        private enum CodingKeys: String, CodingKey {
            case partitionKey = "partitionKey"
            case roleArn = "roleArn"
            case streamName = "streamName"
        }
    }

    public struct LambdaAction: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the Lambda function.
        public let functionArn: String

        @inlinable
        public init(functionArn: String) {
            self.functionArn = functionArn
        }

        private enum CodingKeys: String, CodingKey {
            case functionArn = "functionArn"
        }
    }

    public struct ListActiveViolationsRequest: AWSEncodableShape {
        ///  The criteria for a behavior.
        public let behaviorCriteriaType: BehaviorCriteriaType?
        ///  A list of all suppressed alerts.
        public let listSuppressedAlerts: Bool?
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// The name of the Device Defender security profile for which violations are listed.
        public let securityProfileName: String?
        /// The name of the thing whose active violations are listed.
        public let thingName: String?
        /// The verification state of the violation (detect alarm).
        public let verificationState: VerificationState?

        @inlinable
        public init(behaviorCriteriaType: BehaviorCriteriaType? = nil, listSuppressedAlerts: Bool? = nil, maxResults: Int? = nil, nextToken: String? = nil, securityProfileName: String? = nil, thingName: String? = nil, verificationState: VerificationState? = nil) {
            self.behaviorCriteriaType = behaviorCriteriaType
            self.listSuppressedAlerts = listSuppressedAlerts
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.securityProfileName = securityProfileName
            self.thingName = thingName
            self.verificationState = verificationState
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.behaviorCriteriaType, key: "behaviorCriteriaType")
            request.encodeQuery(self.listSuppressedAlerts, key: "listSuppressedAlerts")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.securityProfileName, key: "securityProfileName")
            request.encodeQuery(self.thingName, key: "thingName")
            request.encodeQuery(self.verificationState, key: "verificationState")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListActiveViolationsResponse: AWSDecodableShape {
        /// The list of active violations.
        public let activeViolations: [ActiveViolation]?
        /// A token that can be used to retrieve the next set of results,  or null if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(activeViolations: [ActiveViolation]? = nil, nextToken: String? = nil) {
            self.activeViolations = activeViolations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case activeViolations = "activeViolations"
            case nextToken = "nextToken"
        }
    }

    public struct ListAttachedPoliciesRequest: AWSEncodableShape {
        /// The token to retrieve the next set of results.
        public let marker: String?
        /// The maximum number of results to be returned per request.
        public let pageSize: Int?
        /// When true, recursively list attached policies.
        public let recursive: Bool?
        /// The group or principal for which the policies will be listed. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).
        public let target: String

        @inlinable
        public init(marker: String? = nil, pageSize: Int? = nil, recursive: Bool? = nil, target: String) {
            self.marker = marker
            self.pageSize = pageSize
            self.recursive = recursive
            self.target = target
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.marker, key: "marker")
            request.encodeQuery(self.pageSize, key: "pageSize")
            request.encodeQuery(self.recursive, key: "recursive")
            request.encodePath(self.target, key: "target")
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "^[A-Za-z0-9+/]+={0,2}$")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAttachedPoliciesResponse: AWSDecodableShape {
        /// The token to retrieve the next set of results, or ``null`` if there are no more results.
        public let nextMarker: String?
        /// The policies.
        public let policies: [Policy]?

        @inlinable
        public init(nextMarker: String? = nil, policies: [Policy]? = nil) {
            self.nextMarker = nextMarker
            self.policies = policies
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker = "nextMarker"
            case policies = "policies"
        }
    }

    public struct ListAuditFindingsRequest: AWSEncodableShape {
        /// A filter to limit results to the findings for the specified audit check.
        public let checkName: String?
        /// A filter to limit results to those found before the specified time. You must specify either the startTime and endTime or the taskId, but not both.
        public let endTime: Date?
        ///  Boolean flag indicating whether only the suppressed findings or the unsuppressed findings should be listed. If this parameter isn't provided, the response will list both suppressed and unsuppressed findings.
        public let listSuppressedFindings: Bool?
        /// The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// Information identifying the noncompliant resource.
        public let resourceIdentifier: ResourceIdentifier?
        /// A filter to limit results to those found after the specified time. You must specify either the startTime and endTime or the taskId, but not both.
        public let startTime: Date?
        /// A filter to limit results to the audit with the specified ID. You must specify either the taskId or the startTime and endTime, but not both.
        public let taskId: String?

        @inlinable
        public init(checkName: String? = nil, endTime: Date? = nil, listSuppressedFindings: Bool? = nil, maxResults: Int? = nil, nextToken: String? = nil, resourceIdentifier: ResourceIdentifier? = nil, startTime: Date? = nil, taskId: String? = nil) {
            self.checkName = checkName
            self.endTime = endTime
            self.listSuppressedFindings = listSuppressedFindings
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceIdentifier = resourceIdentifier
            self.startTime = startTime
            self.taskId = taskId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.resourceIdentifier?.validate(name: "\(name).resourceIdentifier")
            try self.validate(self.taskId, name: "taskId", parent: name, max: 40)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "^[a-zA-Z0-9\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case checkName = "checkName"
            case endTime = "endTime"
            case listSuppressedFindings = "listSuppressedFindings"
            case maxResults = "maxResults"
            case nextToken = "nextToken"
            case resourceIdentifier = "resourceIdentifier"
            case startTime = "startTime"
            case taskId = "taskId"
        }
    }

    public struct ListAuditFindingsResponse: AWSDecodableShape {
        /// The findings (results) of the audit.
        public let findings: [AuditFinding]?
        /// A token that can be used to retrieve the next set of results, or null  if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(findings: [AuditFinding]? = nil, nextToken: String? = nil) {
            self.findings = findings
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case findings = "findings"
            case nextToken = "nextToken"
        }
    }

    public struct ListAuditMitigationActionsExecutionsRequest: AWSEncodableShape {
        /// Specify this filter to limit results to those with a specific status.
        public let actionStatus: AuditMitigationActionsExecutionStatus?
        /// Specify this filter to limit results to those that were applied to a specific audit finding.
        public let findingId: String
        /// The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// Specify this filter to limit results to actions for a specific audit mitigation actions task.
        public let taskId: String

        @inlinable
        public init(actionStatus: AuditMitigationActionsExecutionStatus? = nil, findingId: String, maxResults: Int? = nil, nextToken: String? = nil, taskId: String) {
            self.actionStatus = actionStatus
            self.findingId = findingId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.taskId = taskId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.actionStatus, key: "actionStatus")
            request.encodeQuery(self.findingId, key: "findingId")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.taskId, key: "taskId")
        }

        public func validate(name: String) throws {
            try self.validate(self.findingId, name: "findingId", parent: name, max: 128)
            try self.validate(self.findingId, name: "findingId", parent: name, min: 1)
            try self.validate(self.findingId, name: "findingId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, max: 128)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAuditMitigationActionsExecutionsResponse: AWSDecodableShape {
        /// A set of task execution results based on the input parameters. Details include the mitigation action applied, start time, and task status.
        public let actionsExecutions: [AuditMitigationActionExecutionMetadata]?
        /// The token for the next set of results.
        public let nextToken: String?

        @inlinable
        public init(actionsExecutions: [AuditMitigationActionExecutionMetadata]? = nil, nextToken: String? = nil) {
            self.actionsExecutions = actionsExecutions
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case actionsExecutions = "actionsExecutions"
            case nextToken = "nextToken"
        }
    }

    public struct ListAuditMitigationActionsTasksRequest: AWSEncodableShape {
        /// Specify this filter to limit results to tasks that were applied to results for a specific audit.
        public let auditTaskId: String?
        /// Specify this filter to limit results to tasks that were completed or canceled on or before a specific date and time.
        public let endTime: Date
        /// Specify this filter to limit results to tasks that were applied to a specific audit finding.
        public let findingId: String?
        /// The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// Specify this filter to limit results to tasks that began on or after a specific date and time.
        public let startTime: Date
        /// Specify this filter to limit results to tasks that are in a specific state.
        public let taskStatus: AuditMitigationActionsTaskStatus?

        @inlinable
        public init(auditTaskId: String? = nil, endTime: Date, findingId: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, startTime: Date, taskStatus: AuditMitigationActionsTaskStatus? = nil) {
            self.auditTaskId = auditTaskId
            self.endTime = endTime
            self.findingId = findingId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.startTime = startTime
            self.taskStatus = taskStatus
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.auditTaskId, key: "auditTaskId")
            request.encodeQuery(self.endTime, key: "endTime")
            request.encodeQuery(self.findingId, key: "findingId")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.startTime, key: "startTime")
            request.encodeQuery(self.taskStatus, key: "taskStatus")
        }

        public func validate(name: String) throws {
            try self.validate(self.auditTaskId, name: "auditTaskId", parent: name, max: 40)
            try self.validate(self.auditTaskId, name: "auditTaskId", parent: name, min: 1)
            try self.validate(self.auditTaskId, name: "auditTaskId", parent: name, pattern: "^[a-zA-Z0-9\\-]+$")
            try self.validate(self.findingId, name: "findingId", parent: name, max: 128)
            try self.validate(self.findingId, name: "findingId", parent: name, min: 1)
            try self.validate(self.findingId, name: "findingId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAuditMitigationActionsTasksResponse: AWSDecodableShape {
        /// The token for the next set of results.
        public let nextToken: String?
        /// The collection of audit mitigation tasks that matched the filter criteria.
        public let tasks: [AuditMitigationActionsTaskMetadata]?

        @inlinable
        public init(nextToken: String? = nil, tasks: [AuditMitigationActionsTaskMetadata]? = nil) {
            self.nextToken = nextToken
            self.tasks = tasks
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case tasks = "tasks"
        }
    }

    public struct ListAuditSuppressionsRequest: AWSEncodableShape {
        ///  Determines whether suppressions are listed in ascending order by expiration date or not. If parameter isn't provided, ascendingOrder=true.
        public let ascendingOrder: Bool?
        public let checkName: String?
        ///  The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        ///  The token for the next set of results.
        public let nextToken: String?
        public let resourceIdentifier: ResourceIdentifier?

        @inlinable
        public init(ascendingOrder: Bool? = nil, checkName: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, resourceIdentifier: ResourceIdentifier? = nil) {
            self.ascendingOrder = ascendingOrder
            self.checkName = checkName
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceIdentifier = resourceIdentifier
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.resourceIdentifier?.validate(name: "\(name).resourceIdentifier")
        }

        private enum CodingKeys: String, CodingKey {
            case ascendingOrder = "ascendingOrder"
            case checkName = "checkName"
            case maxResults = "maxResults"
            case nextToken = "nextToken"
            case resourceIdentifier = "resourceIdentifier"
        }
    }

    public struct ListAuditSuppressionsResponse: AWSDecodableShape {
        ///  A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        ///  List of audit suppressions.
        public let suppressions: [AuditSuppression]?

        @inlinable
        public init(nextToken: String? = nil, suppressions: [AuditSuppression]? = nil) {
            self.nextToken = nextToken
            self.suppressions = suppressions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case suppressions = "suppressions"
        }
    }

    public struct ListAuditTasksRequest: AWSEncodableShape {
        /// The end of the time period.
        public let endTime: Date
        /// The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// The beginning of the time period. Audit information is retained for a  limited time (90 days). Requesting a start time prior to what is retained  results in an "InvalidRequestException".
        public let startTime: Date
        /// A filter to limit the output to audits with the specified completion status: can be one of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED".
        public let taskStatus: AuditTaskStatus?
        /// A filter to limit the output to the specified type of audit: can be one of "ON_DEMAND_AUDIT_TASK" or "SCHEDULED__AUDIT_TASK".
        public let taskType: AuditTaskType?

        @inlinable
        public init(endTime: Date, maxResults: Int? = nil, nextToken: String? = nil, startTime: Date, taskStatus: AuditTaskStatus? = nil, taskType: AuditTaskType? = nil) {
            self.endTime = endTime
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.startTime = startTime
            self.taskStatus = taskStatus
            self.taskType = taskType
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.endTime, key: "endTime")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.startTime, key: "startTime")
            request.encodeQuery(self.taskStatus, key: "taskStatus")
            request.encodeQuery(self.taskType, key: "taskType")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAuditTasksResponse: AWSDecodableShape {
        /// A token that can be used to retrieve the next set of results, or null  if there are no additional results.
        public let nextToken: String?
        /// The audits that were performed during the specified time period.
        public let tasks: [AuditTaskMetadata]?

        @inlinable
        public init(nextToken: String? = nil, tasks: [AuditTaskMetadata]? = nil) {
            self.nextToken = nextToken
            self.tasks = tasks
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case tasks = "tasks"
        }
    }

    public struct ListAuthorizersRequest: AWSEncodableShape {
        /// Return the list of authorizers in ascending alphabetical order.
        public let ascendingOrder: Bool?
        /// A marker used to get the next set of results.
        public let marker: String?
        /// The maximum number of results to return at one time.
        public let pageSize: Int?
        /// The status of the list authorizers request.
        public let status: AuthorizerStatus?

        @inlinable
        public init(ascendingOrder: Bool? = nil, marker: String? = nil, pageSize: Int? = nil, status: AuthorizerStatus? = nil) {
            self.ascendingOrder = ascendingOrder
            self.marker = marker
            self.pageSize = pageSize
            self.status = status
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.ascendingOrder, key: "isAscendingOrder")
            request.encodeQuery(self.marker, key: "marker")
            request.encodeQuery(self.pageSize, key: "pageSize")
            request.encodeQuery(self.status, key: "status")
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "^[A-Za-z0-9+/]+={0,2}$")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAuthorizersResponse: AWSDecodableShape {
        /// The authorizers.
        public let authorizers: [AuthorizerSummary]?
        /// A marker used to get the next set of results.
        public let nextMarker: String?

        @inlinable
        public init(authorizers: [AuthorizerSummary]? = nil, nextMarker: String? = nil) {
            self.authorizers = authorizers
            self.nextMarker = nextMarker
        }

        private enum CodingKeys: String, CodingKey {
            case authorizers = "authorizers"
            case nextMarker = "nextMarker"
        }
    }

    public struct ListBillingGroupsRequest: AWSEncodableShape {
        /// The maximum number of results to return per request.
        public let maxResults: Int?
        /// Limit the results to billing groups whose names have the given prefix.
        public let namePrefixFilter: String?
        /// To retrieve the next set of results, the nextToken
        /// 			value from a previous response; otherwise null to receive
        /// 			the first set of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, namePrefixFilter: String? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.namePrefixFilter = namePrefixFilter
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.namePrefixFilter, key: "namePrefixFilter")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.namePrefixFilter, name: "namePrefixFilter", parent: name, max: 128)
            try self.validate(self.namePrefixFilter, name: "namePrefixFilter", parent: name, min: 1)
            try self.validate(self.namePrefixFilter, name: "namePrefixFilter", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListBillingGroupsResponse: AWSDecodableShape {
        /// The list of billing groups.
        public let billingGroups: [GroupNameAndArn]?
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(billingGroups: [GroupNameAndArn]? = nil, nextToken: String? = nil) {
            self.billingGroups = billingGroups
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case billingGroups = "billingGroups"
            case nextToken = "nextToken"
        }
    }

    public struct ListCACertificatesRequest: AWSEncodableShape {
        /// Determines the order of the results.
        public let ascendingOrder: Bool?
        /// The marker for the next set of results.
        public let marker: String?
        /// The result page size.
        public let pageSize: Int?
        /// The name of the provisioning template.
        public let templateName: String?

        @inlinable
        public init(ascendingOrder: Bool? = nil, marker: String? = nil, pageSize: Int? = nil, templateName: String? = nil) {
            self.ascendingOrder = ascendingOrder
            self.marker = marker
            self.pageSize = pageSize
            self.templateName = templateName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.ascendingOrder, key: "isAscendingOrder")
            request.encodeQuery(self.marker, key: "marker")
            request.encodeQuery(self.pageSize, key: "pageSize")
            request.encodeQuery(self.templateName, key: "templateName")
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "^[A-Za-z0-9+/]+={0,2}$")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListCACertificatesResponse: AWSDecodableShape {
        /// The CA certificates registered in your Amazon Web Services account.
        public let certificates: [CACertificate]?
        /// The current position within the list of CA certificates.
        public let nextMarker: String?

        @inlinable
        public init(certificates: [CACertificate]? = nil, nextMarker: String? = nil) {
            self.certificates = certificates
            self.nextMarker = nextMarker
        }

        private enum CodingKeys: String, CodingKey {
            case certificates = "certificates"
            case nextMarker = "nextMarker"
        }
    }

    public struct ListCertificateProvidersRequest: AWSEncodableShape {
        /// Returns the list of certificate providers in ascending alphabetical order.
        public let ascendingOrder: Bool?
        /// The token for the next set of results, or null if there are no more results.
        public let nextToken: String?

        @inlinable
        public init(ascendingOrder: Bool? = nil, nextToken: String? = nil) {
            self.ascendingOrder = ascendingOrder
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.ascendingOrder, key: "isAscendingOrder")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 1024)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[A-Za-z0-9+/]+={0,2}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListCertificateProvidersResponse: AWSDecodableShape {
        /// The list of certificate providers in your Amazon Web Services account.
        public let certificateProviders: [CertificateProviderSummary]?
        /// The token for the next set of results, or null if there are no more results.
        public let nextToken: String?

        @inlinable
        public init(certificateProviders: [CertificateProviderSummary]? = nil, nextToken: String? = nil) {
            self.certificateProviders = certificateProviders
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case certificateProviders = "certificateProviders"
            case nextToken = "nextToken"
        }
    }

    public struct ListCertificatesByCARequest: AWSEncodableShape {
        /// Specifies the order for results. If True, the results are returned in ascending order, based on the creation date.
        public let ascendingOrder: Bool?
        /// The ID of the CA certificate. This operation will list all registered device certificate that were signed by this CA certificate.
        public let caCertificateId: String
        /// The marker for the next set of results.
        public let marker: String?
        /// The result page size.
        public let pageSize: Int?

        @inlinable
        public init(ascendingOrder: Bool? = nil, caCertificateId: String, marker: String? = nil, pageSize: Int? = nil) {
            self.ascendingOrder = ascendingOrder
            self.caCertificateId = caCertificateId
            self.marker = marker
            self.pageSize = pageSize
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.ascendingOrder, key: "isAscendingOrder")
            request.encodePath(self.caCertificateId, key: "caCertificateId")
            request.encodeQuery(self.marker, key: "marker")
            request.encodeQuery(self.pageSize, key: "pageSize")
        }

        public func validate(name: String) throws {
            try self.validate(self.caCertificateId, name: "caCertificateId", parent: name, max: 64)
            try self.validate(self.caCertificateId, name: "caCertificateId", parent: name, min: 64)
            try self.validate(self.caCertificateId, name: "caCertificateId", parent: name, pattern: "^(0x)?[a-fA-F0-9]+$")
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "^[A-Za-z0-9+/]+={0,2}$")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListCertificatesByCAResponse: AWSDecodableShape {
        /// The device certificates signed by the specified CA certificate.
        public let certificates: [Certificate]?
        /// The marker for the next set of results, or null if there are no additional results.
        public let nextMarker: String?

        @inlinable
        public init(certificates: [Certificate]? = nil, nextMarker: String? = nil) {
            self.certificates = certificates
            self.nextMarker = nextMarker
        }

        private enum CodingKeys: String, CodingKey {
            case certificates = "certificates"
            case nextMarker = "nextMarker"
        }
    }

    public struct ListCertificatesRequest: AWSEncodableShape {
        /// Specifies the order for results. If True, the results are returned in ascending order, based on the creation date.
        public let ascendingOrder: Bool?
        /// The marker for the next set of results.
        public let marker: String?
        /// The result page size.
        public let pageSize: Int?

        @inlinable
        public init(ascendingOrder: Bool? = nil, marker: String? = nil, pageSize: Int? = nil) {
            self.ascendingOrder = ascendingOrder
            self.marker = marker
            self.pageSize = pageSize
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.ascendingOrder, key: "isAscendingOrder")
            request.encodeQuery(self.marker, key: "marker")
            request.encodeQuery(self.pageSize, key: "pageSize")
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "^[A-Za-z0-9+/]+={0,2}$")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListCertificatesResponse: AWSDecodableShape {
        /// The descriptions of the certificates.
        public let certificates: [Certificate]?
        /// The marker for the next set of results, or null if there are no additional results.
        public let nextMarker: String?

        @inlinable
        public init(certificates: [Certificate]? = nil, nextMarker: String? = nil) {
            self.certificates = certificates
            self.nextMarker = nextMarker
        }

        private enum CodingKeys: String, CodingKey {
            case certificates = "certificates"
            case nextMarker = "nextMarker"
        }
    }

    public struct ListCommandExecutionsRequest: AWSEncodableShape {
        /// The Amazon Resource Number (ARN) of the command. You can use this information to list all command executions for a particular command.
        public let commandArn: String?
        /// List all command executions that completed any time before or after the date and time that you specify. The date and time uses the format yyyy-MM-dd'T'HH:mm.
        public let completedTimeFilter: TimeFilter?
        /// The maximum number of results to return in this operation.
        public let maxResults: Int?
        /// The namespace of the command.
        public let namespace: CommandNamespace?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?
        /// Specify whether to list the command executions that were created in the ascending or descending order. By default, the API returns all commands in the descending order based on the start time or completion time of the executions, that are determined by the startTimeFilter and completeTimeFilter parameters.
        public let sortOrder: SortOrder?
        /// List all command executions that started any time before or after the date and time that you specify. The date and time uses the format yyyy-MM-dd'T'HH:mm.
        public let startedTimeFilter: TimeFilter?
        /// List all command executions for the device that have a particular status. For example, you can filter the list to display only command executions that have failed or timed out.
        public let status: CommandExecutionStatus?
        /// The Amazon Resource Number (ARN) of the target device. You can use this information to list all command executions for a particular device.
        public let targetArn: String?

        @inlinable
        public init(commandArn: String? = nil, completedTimeFilter: TimeFilter? = nil, maxResults: Int? = nil, namespace: CommandNamespace? = nil, nextToken: String? = nil, sortOrder: SortOrder? = nil, startedTimeFilter: TimeFilter? = nil, status: CommandExecutionStatus? = nil, targetArn: String? = nil) {
            self.commandArn = commandArn
            self.completedTimeFilter = completedTimeFilter
            self.maxResults = maxResults
            self.namespace = namespace
            self.nextToken = nextToken
            self.sortOrder = sortOrder
            self.startedTimeFilter = startedTimeFilter
            self.status = status
            self.targetArn = targetArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.commandArn, forKey: .commandArn)
            try container.encodeIfPresent(self.completedTimeFilter, forKey: .completedTimeFilter)
            request.encodeQuery(self.maxResults, key: "maxResults")
            try container.encodeIfPresent(self.namespace, forKey: .namespace)
            request.encodeQuery(self.nextToken, key: "nextToken")
            try container.encodeIfPresent(self.sortOrder, forKey: .sortOrder)
            try container.encodeIfPresent(self.startedTimeFilter, forKey: .startedTimeFilter)
            try container.encodeIfPresent(self.status, forKey: .status)
            try container.encodeIfPresent(self.targetArn, forKey: .targetArn)
        }

        public func validate(name: String) throws {
            try self.completedTimeFilter?.validate(name: "\(name).completedTimeFilter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.startedTimeFilter?.validate(name: "\(name).startedTimeFilter")
            try self.validate(self.targetArn, name: "targetArn", parent: name, max: 2048)
        }

        private enum CodingKeys: String, CodingKey {
            case commandArn = "commandArn"
            case completedTimeFilter = "completedTimeFilter"
            case namespace = "namespace"
            case sortOrder = "sortOrder"
            case startedTimeFilter = "startedTimeFilter"
            case status = "status"
            case targetArn = "targetArn"
        }
    }

    public struct ListCommandExecutionsResponse: AWSDecodableShape {
        /// The list of command executions.
        public let commandExecutions: [CommandExecutionSummary]?
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(commandExecutions: [CommandExecutionSummary]? = nil, nextToken: String? = nil) {
            self.commandExecutions = commandExecutions
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case commandExecutions = "commandExecutions"
            case nextToken = "nextToken"
        }
    }

    public struct ListCommandsRequest: AWSEncodableShape {
        /// A filter that can be used to display the list of commands that have a specific command parameter name.
        public let commandParameterName: String?
        /// The maximum number of results to return in this operation. By default, the API returns up to a maximum of 25 results. You can override this default value to return up to a maximum of 100 results for this operation.
        public let maxResults: Int?
        /// The namespace of the command. By default, the API returns all commands that have been created for both AWS-IoT and AWS-IoT-FleetWise namespaces. You can override this default value if you want to return all commands that have been created only for a specific namespace.
        public let namespace: CommandNamespace?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?
        /// Specify whether to list the commands that you have created in the ascending or descending order. By default, the API returns all commands in the descending order based on the time that they were created.
        public let sortOrder: SortOrder?

        @inlinable
        public init(commandParameterName: String? = nil, maxResults: Int? = nil, namespace: CommandNamespace? = nil, nextToken: String? = nil, sortOrder: SortOrder? = nil) {
            self.commandParameterName = commandParameterName
            self.maxResults = maxResults
            self.namespace = namespace
            self.nextToken = nextToken
            self.sortOrder = sortOrder
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.commandParameterName, key: "commandParameterName")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.namespace, key: "namespace")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.sortOrder, key: "sortOrder")
        }

        public func validate(name: String) throws {
            try self.validate(self.commandParameterName, name: "commandParameterName", parent: name, max: 192)
            try self.validate(self.commandParameterName, name: "commandParameterName", parent: name, min: 1)
            try self.validate(self.commandParameterName, name: "commandParameterName", parent: name, pattern: "^[.$a-zA-Z0-9_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListCommandsResponse: AWSDecodableShape {
        /// The list of commands.
        public let commands: [CommandSummary]?
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(commands: [CommandSummary]? = nil, nextToken: String? = nil) {
            self.commands = commands
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case commands = "commands"
            case nextToken = "nextToken"
        }
    }

    public struct ListCustomMetricsRequest: AWSEncodableShape {
        ///  The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        ///  The token for the next set of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListCustomMetricsResponse: AWSDecodableShape {
        ///  The name of the custom metric.
        public let metricNames: [String]?
        ///  A token that can be used to retrieve the next set of results,  or null if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(metricNames: [String]? = nil, nextToken: String? = nil) {
            self.metricNames = metricNames
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case metricNames = "metricNames"
            case nextToken = "nextToken"
        }
    }

    public struct ListDetectMitigationActionsExecutionsRequest: AWSEncodableShape {
        ///  The end of the time period for which ML Detect mitigation actions executions are returned.
        public let endTime: Date?
        ///  The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        ///  The token for the next set of results.
        public let nextToken: String?
        ///  A filter to limit results to those found after the specified time. You must specify either the startTime and endTime or the taskId, but not both.
        public let startTime: Date?
        ///  The unique identifier of the task.
        public let taskId: String?
        ///  The name of the thing whose mitigation actions are listed.
        public let thingName: String?
        ///  The unique identifier of the violation.
        public let violationId: String?

        @inlinable
        public init(endTime: Date? = nil, maxResults: Int? = nil, nextToken: String? = nil, startTime: Date? = nil, taskId: String? = nil, thingName: String? = nil, violationId: String? = nil) {
            self.endTime = endTime
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.startTime = startTime
            self.taskId = taskId
            self.thingName = thingName
            self.violationId = violationId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.endTime, key: "endTime")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.startTime, key: "startTime")
            request.encodeQuery(self.taskId, key: "taskId")
            request.encodeQuery(self.thingName, key: "thingName")
            request.encodeQuery(self.violationId, key: "violationId")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, max: 128)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.violationId, name: "violationId", parent: name, max: 128)
            try self.validate(self.violationId, name: "violationId", parent: name, min: 1)
            try self.validate(self.violationId, name: "violationId", parent: name, pattern: "^[a-zA-Z0-9\\-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListDetectMitigationActionsExecutionsResponse: AWSDecodableShape {
        ///  List of actions executions.
        public let actionsExecutions: [DetectMitigationActionExecution]?
        ///  A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(actionsExecutions: [DetectMitigationActionExecution]? = nil, nextToken: String? = nil) {
            self.actionsExecutions = actionsExecutions
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case actionsExecutions = "actionsExecutions"
            case nextToken = "nextToken"
        }
    }

    public struct ListDetectMitigationActionsTasksRequest: AWSEncodableShape {
        ///  The end of the time period for which ML Detect mitigation actions tasks are returned.
        public let endTime: Date
        /// The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        ///  The token for the next set of results.
        public let nextToken: String?
        ///  A filter to limit results to those found after the specified time. You must specify either the startTime and endTime or the taskId, but not both.
        public let startTime: Date

        @inlinable
        public init(endTime: Date, maxResults: Int? = nil, nextToken: String? = nil, startTime: Date) {
            self.endTime = endTime
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.startTime = startTime
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.endTime, key: "endTime")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.startTime, key: "startTime")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListDetectMitigationActionsTasksResponse: AWSDecodableShape {
        ///  A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        ///  The collection of ML Detect mitigation tasks that matched the filter criteria.
        public let tasks: [DetectMitigationActionsTaskSummary]?

        @inlinable
        public init(nextToken: String? = nil, tasks: [DetectMitigationActionsTaskSummary]? = nil) {
            self.nextToken = nextToken
            self.tasks = tasks
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case tasks = "tasks"
        }
    }

    public struct ListDimensionsRequest: AWSEncodableShape {
        /// The maximum number of results to retrieve at one time.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListDimensionsResponse: AWSDecodableShape {
        /// A list of the names of the defined dimensions. Use DescribeDimension to get details for a dimension.
        public let dimensionNames: [String]?
        /// A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(dimensionNames: [String]? = nil, nextToken: String? = nil) {
            self.dimensionNames = dimensionNames
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case dimensionNames = "dimensionNames"
            case nextToken = "nextToken"
        }
    }

    public struct ListDomainConfigurationsRequest: AWSEncodableShape {
        /// The marker for the next set of results.
        public let marker: String?
        /// The result page size.
        public let pageSize: Int?
        /// The type of service delivered by the endpoint.
        public let serviceType: ServiceType?

        @inlinable
        public init(marker: String? = nil, pageSize: Int? = nil, serviceType: ServiceType? = nil) {
            self.marker = marker
            self.pageSize = pageSize
            self.serviceType = serviceType
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.marker, key: "marker")
            request.encodeQuery(self.pageSize, key: "pageSize")
            request.encodeQuery(self.serviceType, key: "serviceType")
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "^[A-Za-z0-9+/]+={0,2}$")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListDomainConfigurationsResponse: AWSDecodableShape {
        /// A list of objects that contain summary information about the user's domain configurations.
        public let domainConfigurations: [DomainConfigurationSummary]?
        /// The marker for the next set of results.
        public let nextMarker: String?

        @inlinable
        public init(domainConfigurations: [DomainConfigurationSummary]? = nil, nextMarker: String? = nil) {
            self.domainConfigurations = domainConfigurations
            self.nextMarker = nextMarker
        }

        private enum CodingKeys: String, CodingKey {
            case domainConfigurations = "domainConfigurations"
            case nextMarker = "nextMarker"
        }
    }

    public struct ListFleetMetricsRequest: AWSEncodableShape {
        /// The maximum number of results to return in this operation.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken value from a previous response;  otherwise null to receive the first set of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListFleetMetricsResponse: AWSDecodableShape {
        /// The list of fleet metrics objects.
        public let fleetMetrics: [FleetMetricNameAndArn]?
        /// The token for the next set of results. Will not be returned if the operation has returned all results.
        public let nextToken: String?

        @inlinable
        public init(fleetMetrics: [FleetMetricNameAndArn]? = nil, nextToken: String? = nil) {
            self.fleetMetrics = fleetMetrics
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case fleetMetrics = "fleetMetrics"
            case nextToken = "nextToken"
        }
    }

    public struct ListIndicesRequest: AWSEncodableShape {
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// The token used to get the next set of results, or null if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListIndicesResponse: AWSDecodableShape {
        /// The index names.
        public let indexNames: [String]?
        /// The token used to get the next set of results, or null if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(indexNames: [String]? = nil, nextToken: String? = nil) {
            self.indexNames = indexNames
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case indexNames = "indexNames"
            case nextToken = "nextToken"
        }
    }

    public struct ListJobExecutionsForJobRequest: AWSEncodableShape {
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String
        /// The maximum number of results to be returned per request.
        public let maxResults: Int?
        /// The token to retrieve the next set of results.
        public let nextToken: String?
        /// The status of the job.
        public let status: JobExecutionStatus?

        @inlinable
        public init(jobId: String, maxResults: Int? = nil, nextToken: String? = nil, status: JobExecutionStatus? = nil) {
            self.jobId = jobId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.status = status
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.jobId, key: "jobId")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.status, key: "status")
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListJobExecutionsForJobResponse: AWSDecodableShape {
        /// A list of job execution summaries.
        public let executionSummaries: [JobExecutionSummaryForJob]?
        /// The token for the next set of results, or null if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(executionSummaries: [JobExecutionSummaryForJob]? = nil, nextToken: String? = nil) {
            self.executionSummaries = executionSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case executionSummaries = "executionSummaries"
            case nextToken = "nextToken"
        }
    }

    public struct ListJobExecutionsForThingRequest: AWSEncodableShape {
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String?
        /// The maximum number of results to be returned per request.
        public let maxResults: Int?
        /// The namespace used to indicate that a job is a customer-managed job. When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.  $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/   The namespaceId feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.
        public let namespaceId: String?
        /// The token to retrieve the next set of results.
        public let nextToken: String?
        /// An optional filter that lets you search for jobs that have the specified status.
        public let status: JobExecutionStatus?
        /// The thing name.
        public let thingName: String

        @inlinable
        public init(jobId: String? = nil, maxResults: Int? = nil, namespaceId: String? = nil, nextToken: String? = nil, status: JobExecutionStatus? = nil, thingName: String) {
            self.jobId = jobId
            self.maxResults = maxResults
            self.namespaceId = namespaceId
            self.nextToken = nextToken
            self.status = status
            self.thingName = thingName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.jobId, key: "jobId")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.namespaceId, key: "namespaceId")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.status, key: "status")
            request.encodePath(self.thingName, key: "thingName")
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListJobExecutionsForThingResponse: AWSDecodableShape {
        /// A list of job execution summaries.
        public let executionSummaries: [JobExecutionSummaryForThing]?
        /// The token for the next set of results, or null if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(executionSummaries: [JobExecutionSummaryForThing]? = nil, nextToken: String? = nil) {
            self.executionSummaries = executionSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case executionSummaries = "executionSummaries"
            case nextToken = "nextToken"
        }
    }

    public struct ListJobTemplatesRequest: AWSEncodableShape {
        /// The maximum number of results to return in the list.
        public let maxResults: Int?
        /// The token to use to return the next set of results in the list.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListJobTemplatesResponse: AWSDecodableShape {
        /// A list of objects that contain information about the job templates.
        public let jobTemplates: [JobTemplateSummary]?
        /// The token for the next set of results, or null if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(jobTemplates: [JobTemplateSummary]? = nil, nextToken: String? = nil) {
            self.jobTemplates = jobTemplates
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case jobTemplates = "jobTemplates"
            case nextToken = "nextToken"
        }
    }

    public struct ListJobsRequest: AWSEncodableShape {
        /// The maximum number of results to return per request.
        public let maxResults: Int?
        /// The namespace used to indicate that a job is a customer-managed job. When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.  $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/   The namespaceId feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.
        public let namespaceId: String?
        /// The token to retrieve the next set of results.
        public let nextToken: String?
        /// An optional filter that lets you search for jobs that have the specified status.
        public let status: JobStatus?
        /// Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a thing when the thing is added to a target group, even after the job was completed by all things originally in the group.   We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.
        public let targetSelection: TargetSelection?
        /// A filter that limits the returned jobs to those for the specified group.
        public let thingGroupId: String?
        /// A filter that limits the returned jobs to those for the specified group.
        public let thingGroupName: String?

        @inlinable
        public init(maxResults: Int? = nil, namespaceId: String? = nil, nextToken: String? = nil, status: JobStatus? = nil, targetSelection: TargetSelection? = nil, thingGroupId: String? = nil, thingGroupName: String? = nil) {
            self.maxResults = maxResults
            self.namespaceId = namespaceId
            self.nextToken = nextToken
            self.status = status
            self.targetSelection = targetSelection
            self.thingGroupId = thingGroupId
            self.thingGroupName = thingGroupName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.namespaceId, key: "namespaceId")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.status, key: "status")
            request.encodeQuery(self.targetSelection, key: "targetSelection")
            request.encodeQuery(self.thingGroupId, key: "thingGroupId")
            request.encodeQuery(self.thingGroupName, key: "thingGroupName")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.thingGroupId, name: "thingGroupId", parent: name, max: 128)
            try self.validate(self.thingGroupId, name: "thingGroupId", parent: name, min: 1)
            try self.validate(self.thingGroupId, name: "thingGroupId", parent: name, pattern: "^[a-zA-Z0-9\\-]+$")
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListJobsResponse: AWSDecodableShape {
        /// A list of jobs.
        public let jobs: [JobSummary]?
        /// The token for the next set of results, or null if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(jobs: [JobSummary]? = nil, nextToken: String? = nil) {
            self.jobs = jobs
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case jobs = "jobs"
            case nextToken = "nextToken"
        }
    }

    public struct ListManagedJobTemplatesRequest: AWSEncodableShape {
        /// Maximum number of entries that can be returned.
        public let maxResults: Int?
        /// The token to retrieve the next set of results.
        public let nextToken: String?
        /// An optional parameter for template name. If specified, only the versions of the managed job templates that have the specified template name will be returned.
        public let templateName: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, templateName: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.templateName = templateName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.templateName, key: "templateName")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, max: 64)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListManagedJobTemplatesResponse: AWSDecodableShape {
        /// A list of managed job templates that are returned.
        public let managedJobTemplates: [ManagedJobTemplateSummary]?
        /// The token to retrieve the next set of results.
        public let nextToken: String?

        @inlinable
        public init(managedJobTemplates: [ManagedJobTemplateSummary]? = nil, nextToken: String? = nil) {
            self.managedJobTemplates = managedJobTemplates
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case managedJobTemplates = "managedJobTemplates"
            case nextToken = "nextToken"
        }
    }

    public struct ListMetricValuesRequest: AWSEncodableShape {
        /// The dimension name.
        public let dimensionName: String?
        /// The dimension value operator.
        public let dimensionValueOperator: DimensionValueOperator?
        /// The end of the time period for which metric values are returned.
        public let endTime: Date
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// The name of the security profile metric for which values are returned.
        public let metricName: String
        /// The token for the next set of results.
        public let nextToken: String?
        /// The start of the time period for which metric values are returned.
        public let startTime: Date
        /// The name of the thing for which security profile metric values are returned.
        public let thingName: String

        @inlinable
        public init(dimensionName: String? = nil, dimensionValueOperator: DimensionValueOperator? = nil, endTime: Date, maxResults: Int? = nil, metricName: String, nextToken: String? = nil, startTime: Date, thingName: String) {
            self.dimensionName = dimensionName
            self.dimensionValueOperator = dimensionValueOperator
            self.endTime = endTime
            self.maxResults = maxResults
            self.metricName = metricName
            self.nextToken = nextToken
            self.startTime = startTime
            self.thingName = thingName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.dimensionName, key: "dimensionName")
            request.encodeQuery(self.dimensionValueOperator, key: "dimensionValueOperator")
            request.encodeQuery(self.endTime, key: "endTime")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.metricName, key: "metricName")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.startTime, key: "startTime")
            request.encodeQuery(self.thingName, key: "thingName")
        }

        public func validate(name: String) throws {
            try self.validate(self.dimensionName, name: "dimensionName", parent: name, max: 128)
            try self.validate(self.dimensionName, name: "dimensionName", parent: name, min: 1)
            try self.validate(self.dimensionName, name: "dimensionName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListMetricValuesResponse: AWSDecodableShape {
        /// The data the thing reports for the metric during the specified time period.
        public let metricDatumList: [MetricDatum]?
        /// A token that can be used to retrieve the next set of results, or null  if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(metricDatumList: [MetricDatum]? = nil, nextToken: String? = nil) {
            self.metricDatumList = metricDatumList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case metricDatumList = "metricDatumList"
            case nextToken = "nextToken"
        }
    }

    public struct ListMitigationActionsRequest: AWSEncodableShape {
        /// Specify a value to limit the result to mitigation actions with a specific action type.
        public let actionType: MitigationActionType?
        /// The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?

        @inlinable
        public init(actionType: MitigationActionType? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.actionType = actionType
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.actionType, key: "actionType")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListMitigationActionsResponse: AWSDecodableShape {
        /// A set of actions that matched the specified filter criteria.
        public let actionIdentifiers: [MitigationActionIdentifier]?
        /// The token for the next set of results.
        public let nextToken: String?

        @inlinable
        public init(actionIdentifiers: [MitigationActionIdentifier]? = nil, nextToken: String? = nil) {
            self.actionIdentifiers = actionIdentifiers
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case actionIdentifiers = "actionIdentifiers"
            case nextToken = "nextToken"
        }
    }

    public struct ListOTAUpdatesRequest: AWSEncodableShape {
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// A token used to retrieve the next set of results.
        public let nextToken: String?
        /// The OTA update job status.
        public let otaUpdateStatus: OTAUpdateStatus?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, otaUpdateStatus: OTAUpdateStatus? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.otaUpdateStatus = otaUpdateStatus
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.otaUpdateStatus, key: "otaUpdateStatus")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListOTAUpdatesResponse: AWSDecodableShape {
        /// A token to use to get the next set of results.
        public let nextToken: String?
        /// A list of OTA update jobs.
        public let otaUpdates: [OTAUpdateSummary]?

        @inlinable
        public init(nextToken: String? = nil, otaUpdates: [OTAUpdateSummary]? = nil) {
            self.nextToken = nextToken
            self.otaUpdates = otaUpdates
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case otaUpdates = "otaUpdates"
        }
    }

    public struct ListOutgoingCertificatesRequest: AWSEncodableShape {
        /// Specifies the order for results. If True, the results are returned in ascending order, based on the creation date.
        public let ascendingOrder: Bool?
        /// The marker for the next set of results.
        public let marker: String?
        /// The result page size.
        public let pageSize: Int?

        @inlinable
        public init(ascendingOrder: Bool? = nil, marker: String? = nil, pageSize: Int? = nil) {
            self.ascendingOrder = ascendingOrder
            self.marker = marker
            self.pageSize = pageSize
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.ascendingOrder, key: "isAscendingOrder")
            request.encodeQuery(self.marker, key: "marker")
            request.encodeQuery(self.pageSize, key: "pageSize")
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "^[A-Za-z0-9+/]+={0,2}$")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListOutgoingCertificatesResponse: AWSDecodableShape {
        /// The marker for the next set of results.
        public let nextMarker: String?
        /// The certificates that are being transferred but not yet accepted.
        public let outgoingCertificates: [OutgoingCertificate]?

        @inlinable
        public init(nextMarker: String? = nil, outgoingCertificates: [OutgoingCertificate]? = nil) {
            self.nextMarker = nextMarker
            self.outgoingCertificates = outgoingCertificates
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker = "nextMarker"
            case outgoingCertificates = "outgoingCertificates"
        }
    }

    public struct ListPackageVersionsRequest: AWSEncodableShape {
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// The name of the target software package.
        public let packageName: String
        /// The status of the package version. For more information, see Package version lifecycle.
        public let status: PackageVersionStatus?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, packageName: String, status: PackageVersionStatus? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.packageName = packageName
            self.status = status
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodePath(self.packageName, key: "packageName")
            request.encodeQuery(self.status, key: "status")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.packageName, name: "packageName", parent: name, max: 128)
            try self.validate(self.packageName, name: "packageName", parent: name, min: 1)
            try self.validate(self.packageName, name: "packageName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPackageVersionsResponse: AWSDecodableShape {
        /// The token for the next set of results.
        public let nextToken: String?
        /// Lists the package versions associated to the package.
        public let packageVersionSummaries: [PackageVersionSummary]?

        @inlinable
        public init(nextToken: String? = nil, packageVersionSummaries: [PackageVersionSummary]? = nil) {
            self.nextToken = nextToken
            self.packageVersionSummaries = packageVersionSummaries
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case packageVersionSummaries = "packageVersionSummaries"
        }
    }

    public struct ListPackagesRequest: AWSEncodableShape {
        /// The maximum number of results returned at one time.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPackagesResponse: AWSDecodableShape {
        /// The token for the next set of results.
        public let nextToken: String?
        /// The software package summary.
        public let packageSummaries: [PackageSummary]?

        @inlinable
        public init(nextToken: String? = nil, packageSummaries: [PackageSummary]? = nil) {
            self.nextToken = nextToken
            self.packageSummaries = packageSummaries
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case packageSummaries = "packageSummaries"
        }
    }

    public struct ListPoliciesRequest: AWSEncodableShape {
        /// Specifies the order for results. If true, the results are returned in ascending creation order.
        public let ascendingOrder: Bool?
        /// The marker for the next set of results.
        public let marker: String?
        /// The result page size.
        public let pageSize: Int?

        @inlinable
        public init(ascendingOrder: Bool? = nil, marker: String? = nil, pageSize: Int? = nil) {
            self.ascendingOrder = ascendingOrder
            self.marker = marker
            self.pageSize = pageSize
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.ascendingOrder, key: "isAscendingOrder")
            request.encodeQuery(self.marker, key: "marker")
            request.encodeQuery(self.pageSize, key: "pageSize")
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "^[A-Za-z0-9+/]+={0,2}$")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPoliciesResponse: AWSDecodableShape {
        /// The marker for the next set of results, or null if there are no additional results.
        public let nextMarker: String?
        /// The descriptions of the policies.
        public let policies: [Policy]?

        @inlinable
        public init(nextMarker: String? = nil, policies: [Policy]? = nil) {
            self.nextMarker = nextMarker
            self.policies = policies
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker = "nextMarker"
            case policies = "policies"
        }
    }

    public struct ListPolicyPrincipalsRequest: AWSEncodableShape {
        /// Specifies the order for results. If true, the results are returned in ascending creation order.
        public let ascendingOrder: Bool?
        /// The marker for the next set of results.
        public let marker: String?
        /// The result page size.
        public let pageSize: Int?
        /// The policy name.
        public let policyName: String

        @inlinable
        public init(ascendingOrder: Bool? = nil, marker: String? = nil, pageSize: Int? = nil, policyName: String) {
            self.ascendingOrder = ascendingOrder
            self.marker = marker
            self.pageSize = pageSize
            self.policyName = policyName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.ascendingOrder, key: "isAscendingOrder")
            request.encodeQuery(self.marker, key: "marker")
            request.encodeQuery(self.pageSize, key: "pageSize")
            request.encodeHeader(self.policyName, key: "x-amzn-iot-policy")
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "^[A-Za-z0-9+/]+={0,2}$")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[\\w+=,.@-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPolicyPrincipalsResponse: AWSDecodableShape {
        /// The marker for the next set of results, or null if there are no additional results.
        public let nextMarker: String?
        /// The descriptions of the principals.
        public let principals: [String]?

        @inlinable
        public init(nextMarker: String? = nil, principals: [String]? = nil) {
            self.nextMarker = nextMarker
            self.principals = principals
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker = "nextMarker"
            case principals = "principals"
        }
    }

    public struct ListPolicyVersionsRequest: AWSEncodableShape {
        /// The policy name.
        public let policyName: String

        @inlinable
        public init(policyName: String) {
            self.policyName = policyName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.policyName, key: "policyName")
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[\\w+=,.@-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPolicyVersionsResponse: AWSDecodableShape {
        /// The policy versions.
        public let policyVersions: [PolicyVersion]?

        @inlinable
        public init(policyVersions: [PolicyVersion]? = nil) {
            self.policyVersions = policyVersions
        }

        private enum CodingKeys: String, CodingKey {
            case policyVersions = "policyVersions"
        }
    }

    public struct ListPrincipalPoliciesRequest: AWSEncodableShape {
        /// Specifies the order for results. If true, results are returned in ascending creation order.
        public let ascendingOrder: Bool?
        /// The marker for the next set of results.
        public let marker: String?
        /// The result page size.
        public let pageSize: Int?
        /// The principal. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).
        public let principal: String

        @inlinable
        public init(ascendingOrder: Bool? = nil, marker: String? = nil, pageSize: Int? = nil, principal: String) {
            self.ascendingOrder = ascendingOrder
            self.marker = marker
            self.pageSize = pageSize
            self.principal = principal
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.ascendingOrder, key: "isAscendingOrder")
            request.encodeQuery(self.marker, key: "marker")
            request.encodeQuery(self.pageSize, key: "pageSize")
            request.encodeHeader(self.principal, key: "x-amzn-iot-principal")
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "^[A-Za-z0-9+/]+={0,2}$")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPrincipalPoliciesResponse: AWSDecodableShape {
        /// The marker for the next set of results, or null if there are no additional results.
        public let nextMarker: String?
        /// The policies.
        public let policies: [Policy]?

        @inlinable
        public init(nextMarker: String? = nil, policies: [Policy]? = nil) {
            self.nextMarker = nextMarker
            self.policies = policies
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker = "nextMarker"
            case policies = "policies"
        }
    }

    public struct ListPrincipalThingsRequest: AWSEncodableShape {
        /// The maximum number of results to return in this operation.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken
        /// 			value from a previous response; otherwise null to receive
        /// 			the first set of results.
        public let nextToken: String?
        /// The principal.
        public let principal: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, principal: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.principal = principal
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeHeader(self.principal, key: "x-amzn-principal")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPrincipalThingsResponse: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The things.
        public let things: [String]?

        @inlinable
        public init(nextToken: String? = nil, things: [String]? = nil) {
            self.nextToken = nextToken
            self.things = things
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case things = "things"
        }
    }

    public struct ListPrincipalThingsV2Request: AWSEncodableShape {
        /// The maximum number of results to return in this operation.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken
        /// 				value from a previous response; otherwise null to receive
        /// 				the first set of results.
        public let nextToken: String?
        /// The principal. A principal can be an X.509 certificate or an Amazon Cognito ID.
        public let principal: String
        /// The type of the relation you want to filter in the response. If no value is provided in
        /// 			this field, the response will list all things, including both the
        /// 				EXCLUSIVE_THING and NON_EXCLUSIVE_THING attachment
        /// 			types.    EXCLUSIVE_THING - Attaches the specified principal to the specified thing, exclusively.
        /// 						The thing will be the only thing that’s attached to the principal.      NON_EXCLUSIVE_THING - Attaches the specified principal to the specified thing.
        /// 						Multiple things can be attached to the principal.
        public let thingPrincipalType: ThingPrincipalType?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, principal: String, thingPrincipalType: ThingPrincipalType? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.principal = principal
            self.thingPrincipalType = thingPrincipalType
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeHeader(self.principal, key: "x-amzn-principal")
            request.encodeQuery(self.thingPrincipalType, key: "thingPrincipalType")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPrincipalThingsV2Response: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// A list of thingPrincipalObject that represents the principal and the type of relation it has with the thing.
        public let principalThingObjects: [PrincipalThingObject]?

        @inlinable
        public init(nextToken: String? = nil, principalThingObjects: [PrincipalThingObject]? = nil) {
            self.nextToken = nextToken
            self.principalThingObjects = principalThingObjects
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case principalThingObjects = "principalThingObjects"
        }
    }

    public struct ListProvisioningTemplateVersionsRequest: AWSEncodableShape {
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// A token to retrieve the next set of results.
        public let nextToken: String?
        /// The name of the provisioning template.
        public let templateName: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, templateName: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.templateName = templateName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodePath(self.templateName, key: "templateName")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListProvisioningTemplateVersionsResponse: AWSDecodableShape {
        /// A token to retrieve the next set of results.
        public let nextToken: String?
        /// The list of provisioning template versions.
        public let versions: [ProvisioningTemplateVersionSummary]?

        @inlinable
        public init(nextToken: String? = nil, versions: [ProvisioningTemplateVersionSummary]? = nil) {
            self.nextToken = nextToken
            self.versions = versions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case versions = "versions"
        }
    }

    public struct ListProvisioningTemplatesRequest: AWSEncodableShape {
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// A token to retrieve the next set of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListProvisioningTemplatesResponse: AWSDecodableShape {
        /// A token to retrieve the next set of results.
        public let nextToken: String?
        /// A list of provisioning templates
        public let templates: [ProvisioningTemplateSummary]?

        @inlinable
        public init(nextToken: String? = nil, templates: [ProvisioningTemplateSummary]? = nil) {
            self.nextToken = nextToken
            self.templates = templates
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case templates = "templates"
        }
    }

    public struct ListRelatedResourcesForAuditFindingRequest: AWSEncodableShape {
        /// The finding Id.
        public let findingId: String
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// A token that can be used to retrieve the next set of results,  or null if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(findingId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.findingId = findingId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.findingId, key: "findingId")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.findingId, name: "findingId", parent: name, max: 128)
            try self.validate(self.findingId, name: "findingId", parent: name, min: 1)
            try self.validate(self.findingId, name: "findingId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListRelatedResourcesForAuditFindingResponse: AWSDecodableShape {
        /// A token that can be used to retrieve the next set of results,  or null for the first API call.
        public let nextToken: String?
        /// The related resources.
        public let relatedResources: [RelatedResource]?

        @inlinable
        public init(nextToken: String? = nil, relatedResources: [RelatedResource]? = nil) {
            self.nextToken = nextToken
            self.relatedResources = relatedResources
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case relatedResources = "relatedResources"
        }
    }

    public struct ListRoleAliasesRequest: AWSEncodableShape {
        /// Return the list of role aliases in ascending alphabetical order.
        public let ascendingOrder: Bool?
        /// A marker used to get the next set of results.
        public let marker: String?
        /// The maximum number of results to return at one time.
        public let pageSize: Int?

        @inlinable
        public init(ascendingOrder: Bool? = nil, marker: String? = nil, pageSize: Int? = nil) {
            self.ascendingOrder = ascendingOrder
            self.marker = marker
            self.pageSize = pageSize
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.ascendingOrder, key: "isAscendingOrder")
            request.encodeQuery(self.marker, key: "marker")
            request.encodeQuery(self.pageSize, key: "pageSize")
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "^[A-Za-z0-9+/]+={0,2}$")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListRoleAliasesResponse: AWSDecodableShape {
        /// A marker used to get the next set of results.
        public let nextMarker: String?
        /// The role aliases.
        public let roleAliases: [String]?

        @inlinable
        public init(nextMarker: String? = nil, roleAliases: [String]? = nil) {
            self.nextMarker = nextMarker
            self.roleAliases = roleAliases
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker = "nextMarker"
            case roleAliases = "roleAliases"
        }
    }

    public struct ListSbomValidationResultsRequest: AWSEncodableShape {
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The name of the new software package.
        public let packageName: String
        /// The end result of the
        public let validationResult: SbomValidationResult?
        /// The name of the new package version.
        public let versionName: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, packageName: String, validationResult: SbomValidationResult? = nil, versionName: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.packageName = packageName
            self.validationResult = validationResult
            self.versionName = versionName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodePath(self.packageName, key: "packageName")
            request.encodeQuery(self.validationResult, key: "validationResult")
            request.encodePath(self.versionName, key: "versionName")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.packageName, name: "packageName", parent: name, max: 128)
            try self.validate(self.packageName, name: "packageName", parent: name, min: 1)
            try self.validate(self.packageName, name: "packageName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
            try self.validate(self.versionName, name: "versionName", parent: name, max: 64)
            try self.validate(self.versionName, name: "versionName", parent: name, min: 1)
            try self.validate(self.versionName, name: "versionName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListSbomValidationResultsResponse: AWSDecodableShape {
        /// A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// A summary of the validation results for each software bill of materials attached to a software package version.
        public let validationResultSummaries: [SbomValidationResultSummary]?

        @inlinable
        public init(nextToken: String? = nil, validationResultSummaries: [SbomValidationResultSummary]? = nil) {
            self.nextToken = nextToken
            self.validationResultSummaries = validationResultSummaries
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case validationResultSummaries = "validationResultSummaries"
        }
    }

    public struct ListScheduledAuditsRequest: AWSEncodableShape {
        /// The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListScheduledAuditsResponse: AWSDecodableShape {
        /// A token that can be used to retrieve the next set of results,  or null if there are no additional results.
        public let nextToken: String?
        /// The list of scheduled audits.
        public let scheduledAudits: [ScheduledAuditMetadata]?

        @inlinable
        public init(nextToken: String? = nil, scheduledAudits: [ScheduledAuditMetadata]? = nil) {
            self.nextToken = nextToken
            self.scheduledAudits = scheduledAudits
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case scheduledAudits = "scheduledAudits"
        }
    }

    public struct ListSecurityProfilesForTargetRequest: AWSEncodableShape {
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// If true, return child groups too.
        public let recursive: Bool?
        /// The ARN of the target (thing group) whose attached security profiles you want to get.
        public let securityProfileTargetArn: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, recursive: Bool? = nil, securityProfileTargetArn: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.recursive = recursive
            self.securityProfileTargetArn = securityProfileTargetArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.recursive, key: "recursive")
            request.encodeQuery(self.securityProfileTargetArn, key: "securityProfileTargetArn")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListSecurityProfilesForTargetResponse: AWSDecodableShape {
        /// A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// A list of security profiles and their associated targets.
        public let securityProfileTargetMappings: [SecurityProfileTargetMapping]?

        @inlinable
        public init(nextToken: String? = nil, securityProfileTargetMappings: [SecurityProfileTargetMapping]? = nil) {
            self.nextToken = nextToken
            self.securityProfileTargetMappings = securityProfileTargetMappings
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case securityProfileTargetMappings = "securityProfileTargetMappings"
        }
    }

    public struct ListSecurityProfilesRequest: AWSEncodableShape {
        /// A filter to limit results to the security profiles that use the defined dimension. Cannot be used with metricName
        public let dimensionName: String?
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        ///  The name of the custom metric. Cannot be used with dimensionName.
        public let metricName: String?
        /// The token for the next set of results.
        public let nextToken: String?

        @inlinable
        public init(dimensionName: String? = nil, maxResults: Int? = nil, metricName: String? = nil, nextToken: String? = nil) {
            self.dimensionName = dimensionName
            self.maxResults = maxResults
            self.metricName = metricName
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.dimensionName, key: "dimensionName")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.metricName, key: "metricName")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.dimensionName, name: "dimensionName", parent: name, max: 128)
            try self.validate(self.dimensionName, name: "dimensionName", parent: name, min: 1)
            try self.validate(self.dimensionName, name: "dimensionName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, max: 128)
            try self.validate(self.metricName, name: "metricName", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListSecurityProfilesResponse: AWSDecodableShape {
        /// A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// A list of security profile identifiers (names and ARNs).
        public let securityProfileIdentifiers: [SecurityProfileIdentifier]?

        @inlinable
        public init(nextToken: String? = nil, securityProfileIdentifiers: [SecurityProfileIdentifier]? = nil) {
            self.nextToken = nextToken
            self.securityProfileIdentifiers = securityProfileIdentifiers
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case securityProfileIdentifiers = "securityProfileIdentifiers"
        }
    }

    public struct ListStreamsRequest: AWSEncodableShape {
        /// Set to true to return the list of streams in ascending order.
        public let ascendingOrder: Bool?
        /// The maximum number of results to return at a time.
        public let maxResults: Int?
        /// A token used to get the next set of results.
        public let nextToken: String?

        @inlinable
        public init(ascendingOrder: Bool? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.ascendingOrder = ascendingOrder
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.ascendingOrder, key: "isAscendingOrder")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListStreamsResponse: AWSDecodableShape {
        /// A token used to get the next set of results.
        public let nextToken: String?
        /// A list of streams.
        public let streams: [StreamSummary]?

        @inlinable
        public init(nextToken: String? = nil, streams: [StreamSummary]? = nil) {
            self.nextToken = nextToken
            self.streams = streams
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case streams = "streams"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// To retrieve the next set of results, the nextToken
        /// 			value from a previous response; otherwise null to receive
        /// 			the first set of results.
        public let nextToken: String?
        /// The ARN of the resource.
        public let resourceArn: String

        @inlinable
        public init(nextToken: String? = nil, resourceArn: String) {
            self.nextToken = nextToken
            self.resourceArn = resourceArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.resourceArn, key: "resourceArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The list of tags assigned to the resource.
        public let tags: [Tag]?

        @inlinable
        public init(nextToken: String? = nil, tags: [Tag]? = nil) {
            self.nextToken = nextToken
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case tags = "tags"
        }
    }

    public struct ListTargetsForPolicyRequest: AWSEncodableShape {
        /// A marker used to get the next set of results.
        public let marker: String?
        /// The maximum number of results to return at one time.
        public let pageSize: Int?
        /// The policy name.
        public let policyName: String

        @inlinable
        public init(marker: String? = nil, pageSize: Int? = nil, policyName: String) {
            self.marker = marker
            self.pageSize = pageSize
            self.policyName = policyName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.marker, key: "marker")
            request.encodeQuery(self.pageSize, key: "pageSize")
            request.encodePath(self.policyName, key: "policyName")
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "^[A-Za-z0-9+/]+={0,2}$")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[\\w+=,.@-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTargetsForPolicyResponse: AWSDecodableShape {
        /// A marker used to get the next set of results.
        public let nextMarker: String?
        /// The policy targets.
        public let targets: [String]?

        @inlinable
        public init(nextMarker: String? = nil, targets: [String]? = nil) {
            self.nextMarker = nextMarker
            self.targets = targets
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker = "nextMarker"
            case targets = "targets"
        }
    }

    public struct ListTargetsForSecurityProfileRequest: AWSEncodableShape {
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// The security profile.
        public let securityProfileName: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, securityProfileName: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.securityProfileName = securityProfileName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodePath(self.securityProfileName, key: "securityProfileName")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTargetsForSecurityProfileResponse: AWSDecodableShape {
        /// A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The thing groups to which the security profile is attached.
        public let securityProfileTargets: [SecurityProfileTarget]?

        @inlinable
        public init(nextToken: String? = nil, securityProfileTargets: [SecurityProfileTarget]? = nil) {
            self.nextToken = nextToken
            self.securityProfileTargets = securityProfileTargets
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case securityProfileTargets = "securityProfileTargets"
        }
    }

    public struct ListThingGroupsForThingRequest: AWSEncodableShape {
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken
        /// 			value from a previous response; otherwise null to receive
        /// 			the first set of results.
        public let nextToken: String?
        /// The thing name.
        public let thingName: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, thingName: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.thingName = thingName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodePath(self.thingName, key: "thingName")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingGroupsForThingResponse: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The thing groups.
        public let thingGroups: [GroupNameAndArn]?

        @inlinable
        public init(nextToken: String? = nil, thingGroups: [GroupNameAndArn]? = nil) {
            self.nextToken = nextToken
            self.thingGroups = thingGroups
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case thingGroups = "thingGroups"
        }
    }

    public struct ListThingGroupsRequest: AWSEncodableShape {
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// A filter that limits the results to those with the specified name prefix.
        public let namePrefixFilter: String?
        /// To retrieve the next set of results, the nextToken
        /// 			value from a previous response; otherwise null to receive
        /// 			the first set of results.
        public let nextToken: String?
        /// A filter that limits the results to those with the specified parent group.
        public let parentGroup: String?
        /// If true, return child groups as well.
        public let recursive: Bool?

        @inlinable
        public init(maxResults: Int? = nil, namePrefixFilter: String? = nil, nextToken: String? = nil, parentGroup: String? = nil, recursive: Bool? = nil) {
            self.maxResults = maxResults
            self.namePrefixFilter = namePrefixFilter
            self.nextToken = nextToken
            self.parentGroup = parentGroup
            self.recursive = recursive
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.namePrefixFilter, key: "namePrefixFilter")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.parentGroup, key: "parentGroup")
            request.encodeQuery(self.recursive, key: "recursive")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.namePrefixFilter, name: "namePrefixFilter", parent: name, max: 128)
            try self.validate(self.namePrefixFilter, name: "namePrefixFilter", parent: name, min: 1)
            try self.validate(self.namePrefixFilter, name: "namePrefixFilter", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.parentGroup, name: "parentGroup", parent: name, max: 128)
            try self.validate(self.parentGroup, name: "parentGroup", parent: name, min: 1)
            try self.validate(self.parentGroup, name: "parentGroup", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingGroupsResponse: AWSDecodableShape {
        /// The token to use to get the next set of results. Will not be returned if operation has returned all results.
        public let nextToken: String?
        /// The thing groups.
        public let thingGroups: [GroupNameAndArn]?

        @inlinable
        public init(nextToken: String? = nil, thingGroups: [GroupNameAndArn]? = nil) {
            self.nextToken = nextToken
            self.thingGroups = thingGroups
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case thingGroups = "thingGroups"
        }
    }

    public struct ListThingPrincipalsRequest: AWSEncodableShape {
        /// The maximum number of results to return in this operation.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken
        /// 			value from a previous response; otherwise null to receive
        /// 			the first set of results.
        public let nextToken: String?
        /// The name of the thing.
        public let thingName: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, thingName: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.thingName = thingName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodePath(self.thingName, key: "thingName")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingPrincipalsResponse: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The principals associated with the thing.
        public let principals: [String]?

        @inlinable
        public init(nextToken: String? = nil, principals: [String]? = nil) {
            self.nextToken = nextToken
            self.principals = principals
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case principals = "principals"
        }
    }

    public struct ListThingPrincipalsV2Request: AWSEncodableShape {
        /// The maximum number of results to return in this operation.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken
        /// 				value from a previous response; otherwise null to receive
        /// 				the first set of results.
        public let nextToken: String?
        /// The name of the thing.
        public let thingName: String
        /// The type of the relation you want to filter in the response. If no value is provided in
        /// 			this field, the response will list all principals, including both the
        /// 				EXCLUSIVE_THING and NON_EXCLUSIVE_THING attachment
        /// 			types.    EXCLUSIVE_THING - Attaches the specified principal to the specified thing, exclusively.
        /// 						The thing will be the only thing that’s attached to the principal.      NON_EXCLUSIVE_THING - Attaches the specified principal to the specified thing.
        /// 						Multiple things can be attached to the principal.
        public let thingPrincipalType: ThingPrincipalType?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, thingName: String, thingPrincipalType: ThingPrincipalType? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.thingName = thingName
            self.thingPrincipalType = thingPrincipalType
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodePath(self.thingName, key: "thingName")
            request.encodeQuery(self.thingPrincipalType, key: "thingPrincipalType")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingPrincipalsV2Response: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// A list of thingPrincipalObject that represents the principal and the type of relation it has
        /// 				with the thing.
        public let thingPrincipalObjects: [ThingPrincipalObject]?

        @inlinable
        public init(nextToken: String? = nil, thingPrincipalObjects: [ThingPrincipalObject]? = nil) {
            self.nextToken = nextToken
            self.thingPrincipalObjects = thingPrincipalObjects
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case thingPrincipalObjects = "thingPrincipalObjects"
        }
    }

    public struct ListThingRegistrationTaskReportsRequest: AWSEncodableShape {
        /// The maximum number of results to return per request.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken
        /// 			value from a previous response; otherwise null to receive
        /// 		the first set of results.
        public let nextToken: String?
        /// The type of task report.
        public let reportType: ReportType
        /// The id of the task.
        public let taskId: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, reportType: ReportType, taskId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.reportType = reportType
            self.taskId = taskId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.reportType, key: "reportType")
            request.encodePath(self.taskId, key: "taskId")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, max: 40)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingRegistrationTaskReportsResponse: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The type of task report.
        public let reportType: ReportType?
        /// Links to the task resources.
        public let resourceLinks: [String]?

        @inlinable
        public init(nextToken: String? = nil, reportType: ReportType? = nil, resourceLinks: [String]? = nil) {
            self.nextToken = nextToken
            self.reportType = reportType
            self.resourceLinks = resourceLinks
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case reportType = "reportType"
            case resourceLinks = "resourceLinks"
        }
    }

    public struct ListThingRegistrationTasksRequest: AWSEncodableShape {
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken
        /// 			value from a previous response; otherwise null to receive
        /// 			the first set of results.
        public let nextToken: String?
        /// The status of the bulk thing provisioning task.
        public let status: Status?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, status: Status? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.status = status
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.status, key: "status")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingRegistrationTasksResponse: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// A list of bulk thing provisioning task IDs.
        public let taskIds: [String]?

        @inlinable
        public init(nextToken: String? = nil, taskIds: [String]? = nil) {
            self.nextToken = nextToken
            self.taskIds = taskIds
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case taskIds = "taskIds"
        }
    }

    public struct ListThingTypesRequest: AWSEncodableShape {
        /// The maximum number of results to return in this operation.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken
        /// 			value from a previous response; otherwise null to receive
        /// 			the first set of results.
        public let nextToken: String?
        /// The name of the thing type.
        public let thingTypeName: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, thingTypeName: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.thingTypeName = thingTypeName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.thingTypeName, key: "thingTypeName")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, max: 128)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingTypesResponse: AWSDecodableShape {
        /// The token for the next set of results. Will not be returned if operation has returned all results.
        public let nextToken: String?
        /// The thing types.
        public let thingTypes: [ThingTypeDefinition]?

        @inlinable
        public init(nextToken: String? = nil, thingTypes: [ThingTypeDefinition]? = nil) {
            self.nextToken = nextToken
            self.thingTypes = thingTypes
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case thingTypes = "thingTypes"
        }
    }

    public struct ListThingsInBillingGroupRequest: AWSEncodableShape {
        /// The name of the billing group.
        public let billingGroupName: String
        /// The maximum number of results to return per request.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken
        /// 			value from a previous response; otherwise null to receive
        /// 			the first set of results.
        public let nextToken: String?

        @inlinable
        public init(billingGroupName: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.billingGroupName = billingGroupName
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.billingGroupName, key: "billingGroupName")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, max: 128)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, min: 1)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingsInBillingGroupResponse: AWSDecodableShape {
        /// The token to use to get the next set of results. Will not be returned if operation has returned all results.
        public let nextToken: String?
        /// A list of things in the billing group.
        public let things: [String]?

        @inlinable
        public init(nextToken: String? = nil, things: [String]? = nil) {
            self.nextToken = nextToken
            self.things = things
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case things = "things"
        }
    }

    public struct ListThingsInThingGroupRequest: AWSEncodableShape {
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken
        /// 			value from a previous response; otherwise null to receive
        /// 			the first set of results.
        public let nextToken: String?
        /// When true, list things in this thing group and in all child groups as
        /// 			well.
        public let recursive: Bool?
        /// The thing group name.
        public let thingGroupName: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, recursive: Bool? = nil, thingGroupName: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.recursive = recursive
            self.thingGroupName = thingGroupName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.recursive, key: "recursive")
            request.encodePath(self.thingGroupName, key: "thingGroupName")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingsInThingGroupResponse: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The things in the specified thing group.
        public let things: [String]?

        @inlinable
        public init(nextToken: String? = nil, things: [String]? = nil) {
            self.nextToken = nextToken
            self.things = things
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case things = "things"
        }
    }

    public struct ListThingsRequest: AWSEncodableShape {
        /// The attribute name used to search for things.
        public let attributeName: String?
        /// The attribute value used to search for things.
        public let attributeValue: String?
        /// The maximum number of results to return in this operation.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken
        /// 			value from a previous response; otherwise null to receive
        /// 			the first set of results.
        public let nextToken: String?
        /// The name of the thing type used to search for things.
        public let thingTypeName: String?
        /// When true, the action returns the thing resources with attribute values that start with the attributeValue provided. When false, or not present, the action returns only the thing
        /// 			resources with attribute values that match the entire attributeValue
        /// 			provided.
        public let usePrefixAttributeValue: Bool?

        @inlinable
        public init(attributeName: String? = nil, attributeValue: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, thingTypeName: String? = nil, usePrefixAttributeValue: Bool? = nil) {
            self.attributeName = attributeName
            self.attributeValue = attributeValue
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.thingTypeName = thingTypeName
            self.usePrefixAttributeValue = usePrefixAttributeValue
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.attributeName, key: "attributeName")
            request.encodeQuery(self.attributeValue, key: "attributeValue")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.thingTypeName, key: "thingTypeName")
            request.encodeQuery(self.usePrefixAttributeValue, key: "usePrefixAttributeValue")
        }

        public func validate(name: String) throws {
            try self.validate(self.attributeName, name: "attributeName", parent: name, max: 128)
            try self.validate(self.attributeName, name: "attributeName", parent: name, pattern: "^[a-zA-Z0-9_.,@/:#-]+$")
            try self.validate(self.attributeValue, name: "attributeValue", parent: name, max: 800)
            try self.validate(self.attributeValue, name: "attributeValue", parent: name, pattern: "^[a-zA-Z0-9_.,@/:#=\\[\\]-]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, max: 128)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingsResponse: AWSDecodableShape {
        /// The token to use to get the next set of results. Will not be returned if operation has returned all results.
        public let nextToken: String?
        /// The things.
        public let things: [ThingAttribute]?

        @inlinable
        public init(nextToken: String? = nil, things: [ThingAttribute]? = nil) {
            self.nextToken = nextToken
            self.things = things
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case things = "things"
        }
    }

    public struct ListTopicRuleDestinationsRequest: AWSEncodableShape {
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTopicRuleDestinationsResponse: AWSDecodableShape {
        /// Information about a topic rule destination.
        public let destinationSummaries: [TopicRuleDestinationSummary]?
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(destinationSummaries: [TopicRuleDestinationSummary]? = nil, nextToken: String? = nil) {
            self.destinationSummaries = destinationSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case destinationSummaries = "destinationSummaries"
            case nextToken = "nextToken"
        }
    }

    public struct ListTopicRulesRequest: AWSEncodableShape {
        /// The maximum number of results to return.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?
        /// Specifies whether the rule is disabled.
        public let ruleDisabled: Bool?
        /// The topic.
        public let topic: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, ruleDisabled: Bool? = nil, topic: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.ruleDisabled = ruleDisabled
            self.topic = topic
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.ruleDisabled, key: "ruleDisabled")
            request.encodeQuery(self.topic, key: "topic")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 10000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTopicRulesResponse: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The rules.
        public let rules: [TopicRuleListItem]?

        @inlinable
        public init(nextToken: String? = nil, rules: [TopicRuleListItem]? = nil) {
            self.nextToken = nextToken
            self.rules = rules
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case rules = "rules"
        }
    }

    public struct ListV2LoggingLevelsRequest: AWSEncodableShape {
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?
        /// The type of resource for which you are configuring logging. Must be THING_Group.
        public let targetType: LogTargetType?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, targetType: LogTargetType? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.targetType = targetType
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.targetType, key: "targetType")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListV2LoggingLevelsResponse: AWSDecodableShape {
        /// The logging configuration for a target.
        public let logTargetConfigurations: [LogTargetConfiguration]?
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?

        @inlinable
        public init(logTargetConfigurations: [LogTargetConfiguration]? = nil, nextToken: String? = nil) {
            self.logTargetConfigurations = logTargetConfigurations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case logTargetConfigurations = "logTargetConfigurations"
            case nextToken = "nextToken"
        }
    }

    public struct ListViolationEventsRequest: AWSEncodableShape {
        ///  The criteria for a behavior.
        public let behaviorCriteriaType: BehaviorCriteriaType?
        /// The end time for the alerts to be listed.
        public let endTime: Date
        ///  A list of all suppressed alerts.
        public let listSuppressedAlerts: Bool?
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// A filter to limit results to those alerts generated by the specified security profile.
        public let securityProfileName: String?
        /// The start time for the alerts to be listed.
        public let startTime: Date
        /// A filter to limit results to those alerts caused by the specified thing.
        public let thingName: String?
        /// The verification state of the violation (detect alarm).
        public let verificationState: VerificationState?

        @inlinable
        public init(behaviorCriteriaType: BehaviorCriteriaType? = nil, endTime: Date, listSuppressedAlerts: Bool? = nil, maxResults: Int? = nil, nextToken: String? = nil, securityProfileName: String? = nil, startTime: Date, thingName: String? = nil, verificationState: VerificationState? = nil) {
            self.behaviorCriteriaType = behaviorCriteriaType
            self.endTime = endTime
            self.listSuppressedAlerts = listSuppressedAlerts
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.securityProfileName = securityProfileName
            self.startTime = startTime
            self.thingName = thingName
            self.verificationState = verificationState
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.behaviorCriteriaType, key: "behaviorCriteriaType")
            request.encodeQuery(self.endTime, key: "endTime")
            request.encodeQuery(self.listSuppressedAlerts, key: "listSuppressedAlerts")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
            request.encodeQuery(self.securityProfileName, key: "securityProfileName")
            request.encodeQuery(self.startTime, key: "startTime")
            request.encodeQuery(self.thingName, key: "thingName")
            request.encodeQuery(self.verificationState, key: "verificationState")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListViolationEventsResponse: AWSDecodableShape {
        /// A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The security profile violation alerts issued for this account during the given time period,  potentially filtered by security profile, behavior violated, or thing (device) violating.
        public let violationEvents: [ViolationEvent]?

        @inlinable
        public init(nextToken: String? = nil, violationEvents: [ViolationEvent]? = nil) {
            self.nextToken = nextToken
            self.violationEvents = violationEvents
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case violationEvents = "violationEvents"
        }
    }

    public struct LocationAction: AWSEncodableShape & AWSDecodableShape {
        /// The unique ID of the device providing the location data.
        public let deviceId: String
        /// A string that evaluates to a double value that represents the latitude of the device's location.
        public let latitude: String
        /// A string that evaluates to a double value that represents the longitude of the device's location.
        public let longitude: String
        /// The IAM role that grants permission to write to the Amazon Location resource.
        public let roleArn: String
        /// The time that the location data was sampled. The default value is  the time the MQTT message was processed.
        public let timestamp: LocationTimestamp?
        /// The name of the tracker resource in Amazon Location in which the location is updated.
        public let trackerName: String

        @inlinable
        public init(deviceId: String, latitude: String, longitude: String, roleArn: String, timestamp: LocationTimestamp? = nil, trackerName: String) {
            self.deviceId = deviceId
            self.latitude = latitude
            self.longitude = longitude
            self.roleArn = roleArn
            self.timestamp = timestamp
            self.trackerName = trackerName
        }

        private enum CodingKeys: String, CodingKey {
            case deviceId = "deviceId"
            case latitude = "latitude"
            case longitude = "longitude"
            case roleArn = "roleArn"
            case timestamp = "timestamp"
            case trackerName = "trackerName"
        }
    }

    public struct LocationTimestamp: AWSEncodableShape & AWSDecodableShape {
        /// The precision of the timestamp value that results from the expression described in value. Valid values:  SECONDS | MILLISECONDS | MICROSECONDS | NANOSECONDS. The default is MILLISECONDS.
        public let unit: String?
        /// An expression that returns a long epoch time value.
        public let value: String

        @inlinable
        public init(unit: String? = nil, value: String) {
            self.unit = unit
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case unit = "unit"
            case value = "value"
        }
    }

    public struct LogTarget: AWSEncodableShape & AWSDecodableShape {
        /// The target name.
        public let targetName: String?
        /// The target type.
        public let targetType: LogTargetType

        @inlinable
        public init(targetName: String? = nil, targetType: LogTargetType) {
            self.targetName = targetName
            self.targetType = targetType
        }

        private enum CodingKeys: String, CodingKey {
            case targetName = "targetName"
            case targetType = "targetType"
        }
    }

    public struct LogTargetConfiguration: AWSDecodableShape {
        /// The logging level.
        public let logLevel: LogLevel?
        /// A log target
        public let logTarget: LogTarget?

        @inlinable
        public init(logLevel: LogLevel? = nil, logTarget: LogTarget? = nil) {
            self.logLevel = logLevel
            self.logTarget = logTarget
        }

        private enum CodingKeys: String, CodingKey {
            case logLevel = "logLevel"
            case logTarget = "logTarget"
        }
    }

    public struct LoggingOptionsPayload: AWSEncodableShape {
        /// The log level.
        public let logLevel: LogLevel?
        /// The ARN of the IAM role that grants access.
        public let roleArn: String

        @inlinable
        public init(logLevel: LogLevel? = nil, roleArn: String) {
            self.logLevel = logLevel
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case logLevel = "logLevel"
            case roleArn = "roleArn"
        }
    }

    public struct MachineLearningDetectionConfig: AWSEncodableShape & AWSDecodableShape {
        ///  The sensitivity of anomalous behavior evaluation. Can be Low, Medium, or High.
        public let confidenceLevel: ConfidenceLevel

        @inlinable
        public init(confidenceLevel: ConfidenceLevel) {
            self.confidenceLevel = confidenceLevel
        }

        private enum CodingKeys: String, CodingKey {
            case confidenceLevel = "confidenceLevel"
        }
    }

    public struct MaintenanceWindow: AWSEncodableShape & AWSDecodableShape {
        /// Displays the duration of the next maintenance window.
        public let durationInMinutes: Int
        /// Displays the start time of the next maintenance window.
        public let startTime: String

        @inlinable
        public init(durationInMinutes: Int, startTime: String) {
            self.durationInMinutes = durationInMinutes
            self.startTime = startTime
        }

        public func validate(name: String) throws {
            try self.validate(self.durationInMinutes, name: "durationInMinutes", parent: name, max: 1430)
            try self.validate(self.durationInMinutes, name: "durationInMinutes", parent: name, min: 1)
            try self.validate(self.startTime, name: "startTime", parent: name, max: 256)
            try self.validate(self.startTime, name: "startTime", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case durationInMinutes = "durationInMinutes"
            case startTime = "startTime"
        }
    }

    public struct ManagedJobTemplateSummary: AWSDecodableShape {
        /// The description for a managed template.
        public let description: String?
        /// A list of environments that are supported with the managed job template.
        public let environments: [String]?
        /// The Amazon Resource Name (ARN) for a managed template.
        public let templateArn: String?
        /// The unique Name for a managed template.
        public let templateName: String?
        /// The version for a managed template.
        public let templateVersion: String?

        @inlinable
        public init(description: String? = nil, environments: [String]? = nil, templateArn: String? = nil, templateName: String? = nil, templateVersion: String? = nil) {
            self.description = description
            self.environments = environments
            self.templateArn = templateArn
            self.templateName = templateName
            self.templateVersion = templateVersion
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case environments = "environments"
            case templateArn = "templateArn"
            case templateName = "templateName"
            case templateVersion = "templateVersion"
        }
    }

    public struct MetricDatum: AWSDecodableShape {
        /// The time the metric value was reported.
        public let timestamp: Date?
        /// The value reported for the metric.
        public let value: MetricValue?

        @inlinable
        public init(timestamp: Date? = nil, value: MetricValue? = nil) {
            self.timestamp = timestamp
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case timestamp = "timestamp"
            case value = "value"
        }
    }

    public struct MetricDimension: AWSEncodableShape & AWSDecodableShape {
        /// A unique identifier for the dimension.
        public let dimensionName: String
        /// Defines how the dimensionValues of a dimension are interpreted. For example, for dimension type TOPIC_FILTER, the IN operator, a message will be counted only if its topic matches one of the topic filters. With NOT_IN operator, a message will be counted only if it doesn't match any of the topic filters. The operator is optional: if it's not provided (is null), it will be interpreted as IN.
        public let `operator`: DimensionValueOperator?

        @inlinable
        public init(dimensionName: String, operator: DimensionValueOperator? = nil) {
            self.dimensionName = dimensionName
            self.`operator` = `operator`
        }

        public func validate(name: String) throws {
            try self.validate(self.dimensionName, name: "dimensionName", parent: name, max: 128)
            try self.validate(self.dimensionName, name: "dimensionName", parent: name, min: 1)
            try self.validate(self.dimensionName, name: "dimensionName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case dimensionName = "dimensionName"
            case `operator` = "operator"
        }
    }

    public struct MetricToRetain: AWSEncodableShape & AWSDecodableShape {
        /// The value indicates exporting metrics related to the MetricToRetain  when it's true.
        public let exportMetric: Bool?
        /// What is measured by the behavior.
        public let metric: String
        /// The dimension of a metric. This can't be used with custom metrics.
        public let metricDimension: MetricDimension?

        @inlinable
        public init(exportMetric: Bool? = nil, metric: String, metricDimension: MetricDimension? = nil) {
            self.exportMetric = exportMetric
            self.metric = metric
            self.metricDimension = metricDimension
        }

        public func validate(name: String) throws {
            try self.metricDimension?.validate(name: "\(name).metricDimension")
        }

        private enum CodingKeys: String, CodingKey {
            case exportMetric = "exportMetric"
            case metric = "metric"
            case metricDimension = "metricDimension"
        }
    }

    public struct MetricValue: AWSEncodableShape & AWSDecodableShape {
        /// If the comparisonOperator calls for a set of CIDRs, use this to specify that set to be compared with the metric.
        public let cidrs: [String]?
        /// If the comparisonOperator calls for a numeric value, use this  to specify that numeric value to be compared with the metric.
        public let count: Int64?
        ///  The numeral value of a metric.
        public let number: Double?
        ///  The numeral values of a metric.
        public let numbers: [Double]?
        /// If the comparisonOperator calls for a set of ports, use this to specify that set to be compared with the metric.
        public let ports: [Int]?
        ///  The string values of a metric.
        public let strings: [String]?

        @inlinable
        public init(cidrs: [String]? = nil, count: Int64? = nil, number: Double? = nil, numbers: [Double]? = nil, ports: [Int]? = nil, strings: [String]? = nil) {
            self.cidrs = cidrs
            self.count = count
            self.number = number
            self.numbers = numbers
            self.ports = ports
            self.strings = strings
        }

        public func validate(name: String) throws {
            try self.cidrs?.forEach {
                try validate($0, name: "cidrs[]", parent: name, max: 43)
                try validate($0, name: "cidrs[]", parent: name, min: 2)
                try validate($0, name: "cidrs[]", parent: name, pattern: "^[a-fA-F0-9:\\.\\/]+$")
            }
            try self.validate(self.count, name: "count", parent: name, min: 0)
            try self.ports?.forEach {
                try validate($0, name: "ports[]", parent: name, max: 65535)
                try validate($0, name: "ports[]", parent: name, min: 0)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case cidrs = "cidrs"
            case count = "count"
            case number = "number"
            case numbers = "numbers"
            case ports = "ports"
            case strings = "strings"
        }
    }

    public struct MetricsExportConfig: AWSEncodableShape & AWSDecodableShape {
        /// The MQTT topic that Device Defender Detect should publish messages to for metrics export.
        public let mqttTopic: String
        /// This role ARN has permission to publish MQTT messages, after which Device Defender Detect can assume the role and publish messages on your behalf.
        public let roleArn: String

        @inlinable
        public init(mqttTopic: String, roleArn: String) {
            self.mqttTopic = mqttTopic
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.mqttTopic, name: "mqttTopic", parent: name, max: 512)
            try self.validate(self.mqttTopic, name: "mqttTopic", parent: name, min: 1)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case mqttTopic = "mqttTopic"
            case roleArn = "roleArn"
        }
    }

    public struct MitigationAction: AWSDecodableShape {
        /// The set of parameters for this mitigation action. The parameters vary, depending on the kind of action you apply.
        public let actionParams: MitigationActionParams?
        /// A unique identifier for the mitigation action.
        public let id: String?
        /// A user-friendly name for the mitigation action.
        public let name: String?
        /// The IAM role ARN used to apply this mitigation action.
        public let roleArn: String?

        @inlinable
        public init(actionParams: MitigationActionParams? = nil, id: String? = nil, name: String? = nil, roleArn: String? = nil) {
            self.actionParams = actionParams
            self.id = id
            self.name = name
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case actionParams = "actionParams"
            case id = "id"
            case name = "name"
            case roleArn = "roleArn"
        }
    }

    public struct MitigationActionIdentifier: AWSDecodableShape {
        /// The IAM role ARN used to apply this mitigation action.
        public let actionArn: String?
        /// The friendly name of the mitigation action.
        public let actionName: String?
        /// The date when this mitigation action was created.
        public let creationDate: Date?

        @inlinable
        public init(actionArn: String? = nil, actionName: String? = nil, creationDate: Date? = nil) {
            self.actionArn = actionArn
            self.actionName = actionName
            self.creationDate = creationDate
        }

        private enum CodingKeys: String, CodingKey {
            case actionArn = "actionArn"
            case actionName = "actionName"
            case creationDate = "creationDate"
        }
    }

    public struct MitigationActionParams: AWSEncodableShape & AWSDecodableShape {
        /// Parameters to define a mitigation action that moves devices associated with a certificate to one or more specified thing groups, typically for quarantine.
        public let addThingsToThingGroupParams: AddThingsToThingGroupParams?
        /// Parameters to define a mitigation action that enables Amazon Web Services IoT Core logging at a specified level of detail.
        public let enableIoTLoggingParams: EnableIoTLoggingParams?
        /// Parameters to define a mitigation action that publishes findings to Amazon Simple Notification Service (Amazon SNS. You can implement your own custom actions in response to the Amazon SNS messages.
        public let publishFindingToSnsParams: PublishFindingToSnsParams?
        /// Parameters to define a mitigation action that adds a blank policy to restrict permissions.
        public let replaceDefaultPolicyVersionParams: ReplaceDefaultPolicyVersionParams?
        /// Parameters to define a mitigation action that changes the state of the CA certificate to inactive.
        public let updateCACertificateParams: UpdateCACertificateParams?
        /// Parameters to define a mitigation action that changes the state of the device certificate to inactive.
        public let updateDeviceCertificateParams: UpdateDeviceCertificateParams?

        @inlinable
        public init(addThingsToThingGroupParams: AddThingsToThingGroupParams? = nil, enableIoTLoggingParams: EnableIoTLoggingParams? = nil, publishFindingToSnsParams: PublishFindingToSnsParams? = nil, replaceDefaultPolicyVersionParams: ReplaceDefaultPolicyVersionParams? = nil, updateCACertificateParams: UpdateCACertificateParams? = nil, updateDeviceCertificateParams: UpdateDeviceCertificateParams? = nil) {
            self.addThingsToThingGroupParams = addThingsToThingGroupParams
            self.enableIoTLoggingParams = enableIoTLoggingParams
            self.publishFindingToSnsParams = publishFindingToSnsParams
            self.replaceDefaultPolicyVersionParams = replaceDefaultPolicyVersionParams
            self.updateCACertificateParams = updateCACertificateParams
            self.updateDeviceCertificateParams = updateDeviceCertificateParams
        }

        public func validate(name: String) throws {
            try self.addThingsToThingGroupParams?.validate(name: "\(name).addThingsToThingGroupParams")
            try self.enableIoTLoggingParams?.validate(name: "\(name).enableIoTLoggingParams")
            try self.publishFindingToSnsParams?.validate(name: "\(name).publishFindingToSnsParams")
        }

        private enum CodingKeys: String, CodingKey {
            case addThingsToThingGroupParams = "addThingsToThingGroupParams"
            case enableIoTLoggingParams = "enableIoTLoggingParams"
            case publishFindingToSnsParams = "publishFindingToSnsParams"
            case replaceDefaultPolicyVersionParams = "replaceDefaultPolicyVersionParams"
            case updateCACertificateParams = "updateCACertificateParams"
            case updateDeviceCertificateParams = "updateDeviceCertificateParams"
        }
    }

    public struct Mqtt5Configuration: AWSEncodableShape & AWSDecodableShape {
        /// An object that represents the propagating thing attributes and the connection attributes.
        public let propagatingAttributes: [PropagatingAttribute]?

        @inlinable
        public init(propagatingAttributes: [PropagatingAttribute]? = nil) {
            self.propagatingAttributes = propagatingAttributes
        }

        public func validate(name: String) throws {
            try self.propagatingAttributes?.forEach {
                try $0.validate(name: "\(name).propagatingAttributes[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case propagatingAttributes = "propagatingAttributes"
        }
    }

    public struct MqttContext: AWSEncodableShape {
        /// The value of the clientId key in an MQTT authorization request.
        public let clientId: String?
        /// The value of the password key in an MQTT authorization request.
        public let password: AWSBase64Data?
        /// The value of the username key in an MQTT authorization request.
        public let username: String?

        @inlinable
        public init(clientId: String? = nil, password: AWSBase64Data? = nil, username: String? = nil) {
            self.clientId = clientId
            self.password = password
            self.username = username
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 65535)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.clientId, name: "clientId", parent: name, pattern: "^[\\s\\S]*$")
            try self.validate(self.password, name: "password", parent: name, max: 65535)
            try self.validate(self.password, name: "password", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, max: 65535)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientId = "clientId"
            case password = "password"
            case username = "username"
        }
    }

    public struct MqttHeaders: AWSEncodableShape & AWSDecodableShape {
        /// A UTF-8 encoded string that describes the content of the publishing message. For more information, see  Content Type from the MQTT Version 5.0 specification. Supports substitution templates.
        public let contentType: String?
        /// The base64-encoded binary data used by the sender of the request message to identify which request the response message is for when it's received. For more information, see  Correlation Data from the MQTT Version 5.0 specification.   This binary data must be based64-encoded.   Supports substitution templates.
        public let correlationData: String?
        /// A user-defined integer value that will persist a message at the message broker for a specified amount of time to ensure that the message will expire if it's no longer relevant to the subscriber. The value of messageExpiry represents the number of seconds before it expires. For more information about the limits of messageExpiry, see Amazon Web Services IoT Core message broker and protocol limits and quotas  from the Amazon Web Services Reference Guide. Supports substitution templates.
        public let messageExpiry: String?
        /// An Enum string value that indicates whether the payload is formatted as UTF-8. Valid values are UNSPECIFIED_BYTES and UTF8_DATA. For more information, see  Payload Format Indicator from the MQTT Version 5.0 specification. Supports substitution templates.
        public let payloadFormatIndicator: String?
        /// A UTF-8 encoded string that's used as the topic name for a response message. The response topic is used to describe  the topic which the receiver should publish to as part of the request-response flow. The topic must not contain wildcard  characters. For more information, see  Response Topic from the MQTT Version 5.0 specification. Supports substitution templates.
        public let responseTopic: String?
        /// An array of key-value pairs that you define in the MQTT5 header.
        public let userProperties: [UserProperty]?

        @inlinable
        public init(contentType: String? = nil, correlationData: String? = nil, messageExpiry: String? = nil, payloadFormatIndicator: String? = nil, responseTopic: String? = nil, userProperties: [UserProperty]? = nil) {
            self.contentType = contentType
            self.correlationData = correlationData
            self.messageExpiry = messageExpiry
            self.payloadFormatIndicator = payloadFormatIndicator
            self.responseTopic = responseTopic
            self.userProperties = userProperties
        }

        public func validate(name: String) throws {
            try self.validate(self.contentType, name: "contentType", parent: name, max: 1024)
            try self.validate(self.correlationData, name: "correlationData", parent: name, max: 1024)
            try self.validate(self.messageExpiry, name: "messageExpiry", parent: name, max: 1024)
            try self.validate(self.payloadFormatIndicator, name: "payloadFormatIndicator", parent: name, max: 1024)
            try self.validate(self.responseTopic, name: "responseTopic", parent: name, max: 1024)
            try self.userProperties?.forEach {
                try $0.validate(name: "\(name).userProperties[]")
            }
            try self.validate(self.userProperties, name: "userProperties", parent: name, max: 100)
            try self.validate(self.userProperties, name: "userProperties", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case contentType = "contentType"
            case correlationData = "correlationData"
            case messageExpiry = "messageExpiry"
            case payloadFormatIndicator = "payloadFormatIndicator"
            case responseTopic = "responseTopic"
            case userProperties = "userProperties"
        }
    }

    public struct NonCompliantResource: AWSDecodableShape {
        /// Other information about the noncompliant resource.
        public let additionalInfo: [String: String]?
        /// Information that identifies the noncompliant resource.
        public let resourceIdentifier: ResourceIdentifier?
        /// The type of the noncompliant resource.
        public let resourceType: ResourceType?

        @inlinable
        public init(additionalInfo: [String: String]? = nil, resourceIdentifier: ResourceIdentifier? = nil, resourceType: ResourceType? = nil) {
            self.additionalInfo = additionalInfo
            self.resourceIdentifier = resourceIdentifier
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case additionalInfo = "additionalInfo"
            case resourceIdentifier = "resourceIdentifier"
            case resourceType = "resourceType"
        }
    }

    public struct OTAUpdateFile: AWSEncodableShape & AWSDecodableShape {
        /// A list of name-attribute pairs. They won't be sent to devices as a part of the Job document.
        public let attributes: [String: String]?
        /// The code signing method of the file.
        public let codeSigning: CodeSigning?
        /// The location of the updated firmware.
        public let fileLocation: FileLocation?
        /// The name of the file.
        public let fileName: String?
        /// An integer value you can include in the job document to allow your devices to identify the type of file received  from the cloud.
        public let fileType: Int?
        /// The file version.
        public let fileVersion: String?

        @inlinable
        public init(attributes: [String: String]? = nil, codeSigning: CodeSigning? = nil, fileLocation: FileLocation? = nil, fileName: String? = nil, fileType: Int? = nil, fileVersion: String? = nil) {
            self.attributes = attributes
            self.codeSigning = codeSigning
            self.fileLocation = fileLocation
            self.fileName = fileName
            self.fileType = fileType
            self.fileVersion = fileVersion
        }

        public func validate(name: String) throws {
            try self.attributes?.forEach {
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, max: 4096)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, pattern: "^[\\s\\S]*$")
            }
            try self.codeSigning?.validate(name: "\(name).codeSigning")
            try self.fileLocation?.validate(name: "\(name).fileLocation")
            try self.validate(self.fileType, name: "fileType", parent: name, max: 255)
            try self.validate(self.fileType, name: "fileType", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "attributes"
            case codeSigning = "codeSigning"
            case fileLocation = "fileLocation"
            case fileName = "fileName"
            case fileType = "fileType"
            case fileVersion = "fileVersion"
        }
    }

    public struct OTAUpdateInfo: AWSDecodableShape {
        /// A collection of name/value pairs
        public let additionalParameters: [String: String]?
        /// The IoT job ARN associated with the OTA update.
        public let awsIotJobArn: String?
        /// The IoT job ID associated with the OTA update.
        public let awsIotJobId: String?
        /// Configuration for the rollout of OTA updates.
        public let awsJobExecutionsRolloutConfig: AwsJobExecutionsRolloutConfig?
        /// Configuration information for pre-signed URLs. Valid when protocols contains HTTP.
        public let awsJobPresignedUrlConfig: AwsJobPresignedUrlConfig?
        /// The date when the OTA update was created.
        public let creationDate: Date?
        /// A description of the OTA update.
        public let description: String?
        /// Error information associated with the OTA update.
        public let errorInfo: ErrorInfo?
        /// The date when the OTA update was last updated.
        public let lastModifiedDate: Date?
        /// The OTA update ARN.
        public let otaUpdateArn: String?
        /// A list of files associated with the OTA update.
        public let otaUpdateFiles: [OTAUpdateFile]?
        /// The OTA update ID.
        public let otaUpdateId: String?
        /// The status of the OTA update.
        public let otaUpdateStatus: OTAUpdateStatus?
        /// The protocol used to transfer the OTA update image. Valid values are [HTTP], [MQTT], [HTTP, MQTT]. When both HTTP and MQTT are specified, the target device can choose the protocol.
        public let protocols: [`Protocol`]?
        /// The targets of the OTA update.
        public let targets: [String]?
        /// Specifies whether the OTA update will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the OTA update (SNAPSHOT). If continuous, the OTA update may also be run on a thing when a change is detected in a target. For example, an OTA update will run on a thing when the thing is added to a target group, even after the OTA update was completed by all things originally in the group.
        public let targetSelection: TargetSelection?

        @inlinable
        public init(additionalParameters: [String: String]? = nil, awsIotJobArn: String? = nil, awsIotJobId: String? = nil, awsJobExecutionsRolloutConfig: AwsJobExecutionsRolloutConfig? = nil, awsJobPresignedUrlConfig: AwsJobPresignedUrlConfig? = nil, creationDate: Date? = nil, description: String? = nil, errorInfo: ErrorInfo? = nil, lastModifiedDate: Date? = nil, otaUpdateArn: String? = nil, otaUpdateFiles: [OTAUpdateFile]? = nil, otaUpdateId: String? = nil, otaUpdateStatus: OTAUpdateStatus? = nil, protocols: [`Protocol`]? = nil, targets: [String]? = nil, targetSelection: TargetSelection? = nil) {
            self.additionalParameters = additionalParameters
            self.awsIotJobArn = awsIotJobArn
            self.awsIotJobId = awsIotJobId
            self.awsJobExecutionsRolloutConfig = awsJobExecutionsRolloutConfig
            self.awsJobPresignedUrlConfig = awsJobPresignedUrlConfig
            self.creationDate = creationDate
            self.description = description
            self.errorInfo = errorInfo
            self.lastModifiedDate = lastModifiedDate
            self.otaUpdateArn = otaUpdateArn
            self.otaUpdateFiles = otaUpdateFiles
            self.otaUpdateId = otaUpdateId
            self.otaUpdateStatus = otaUpdateStatus
            self.protocols = protocols
            self.targets = targets
            self.targetSelection = targetSelection
        }

        private enum CodingKeys: String, CodingKey {
            case additionalParameters = "additionalParameters"
            case awsIotJobArn = "awsIotJobArn"
            case awsIotJobId = "awsIotJobId"
            case awsJobExecutionsRolloutConfig = "awsJobExecutionsRolloutConfig"
            case awsJobPresignedUrlConfig = "awsJobPresignedUrlConfig"
            case creationDate = "creationDate"
            case description = "description"
            case errorInfo = "errorInfo"
            case lastModifiedDate = "lastModifiedDate"
            case otaUpdateArn = "otaUpdateArn"
            case otaUpdateFiles = "otaUpdateFiles"
            case otaUpdateId = "otaUpdateId"
            case otaUpdateStatus = "otaUpdateStatus"
            case protocols = "protocols"
            case targets = "targets"
            case targetSelection = "targetSelection"
        }
    }

    public struct OTAUpdateSummary: AWSDecodableShape {
        /// The date when the OTA update was created.
        public let creationDate: Date?
        /// The OTA update ARN.
        public let otaUpdateArn: String?
        /// The OTA update ID.
        public let otaUpdateId: String?

        @inlinable
        public init(creationDate: Date? = nil, otaUpdateArn: String? = nil, otaUpdateId: String? = nil) {
            self.creationDate = creationDate
            self.otaUpdateArn = otaUpdateArn
            self.otaUpdateId = otaUpdateId
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
            case otaUpdateArn = "otaUpdateArn"
            case otaUpdateId = "otaUpdateId"
        }
    }

    public struct OpenSearchAction: AWSEncodableShape & AWSDecodableShape {
        /// The endpoint of your OpenSearch domain.
        public let endpoint: String
        /// The unique identifier for the document you are storing.
        public let id: String
        /// The OpenSearch index where you want to store your data.
        public let index: String
        /// The IAM role ARN that has access to OpenSearch.
        public let roleArn: String
        /// The type of document you are storing.
        public let type: String

        @inlinable
        public init(endpoint: String, id: String, index: String, roleArn: String, type: String) {
            self.endpoint = endpoint
            self.id = id
            self.index = index
            self.roleArn = roleArn
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.endpoint, name: "endpoint", parent: name, pattern: "^https?://")
        }

        private enum CodingKeys: String, CodingKey {
            case endpoint = "endpoint"
            case id = "id"
            case index = "index"
            case roleArn = "roleArn"
            case type = "type"
        }
    }

    public struct OutgoingCertificate: AWSDecodableShape {
        /// The certificate ARN.
        public let certificateArn: String?
        /// The certificate ID.
        public let certificateId: String?
        /// The certificate creation date.
        public let creationDate: Date?
        /// The date the transfer was initiated.
        public let transferDate: Date?
        /// The transfer message.
        public let transferMessage: String?
        /// The Amazon Web Services account to which the transfer was made.
        public let transferredTo: String?

        @inlinable
        public init(certificateArn: String? = nil, certificateId: String? = nil, creationDate: Date? = nil, transferDate: Date? = nil, transferMessage: String? = nil, transferredTo: String? = nil) {
            self.certificateArn = certificateArn
            self.certificateId = certificateId
            self.creationDate = creationDate
            self.transferDate = transferDate
            self.transferMessage = transferMessage
            self.transferredTo = transferredTo
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn = "certificateArn"
            case certificateId = "certificateId"
            case creationDate = "creationDate"
            case transferDate = "transferDate"
            case transferMessage = "transferMessage"
            case transferredTo = "transferredTo"
        }
    }

    public struct PackageSummary: AWSDecodableShape {
        /// The date that the package was created.
        public let creationDate: Date?
        /// The name of the default package version.
        public let defaultVersionName: String?
        /// The date that the package was last updated.
        public let lastModifiedDate: Date?
        /// The name for the target software package.
        public let packageName: String?

        @inlinable
        public init(creationDate: Date? = nil, defaultVersionName: String? = nil, lastModifiedDate: Date? = nil, packageName: String? = nil) {
            self.creationDate = creationDate
            self.defaultVersionName = defaultVersionName
            self.lastModifiedDate = lastModifiedDate
            self.packageName = packageName
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
            case defaultVersionName = "defaultVersionName"
            case lastModifiedDate = "lastModifiedDate"
            case packageName = "packageName"
        }
    }

    public struct PackageVersionArtifact: AWSEncodableShape & AWSDecodableShape {
        public let s3Location: S3Location?

        @inlinable
        public init(s3Location: S3Location? = nil) {
            self.s3Location = s3Location
        }

        public func validate(name: String) throws {
            try self.s3Location?.validate(name: "\(name).s3Location")
        }

        private enum CodingKeys: String, CodingKey {
            case s3Location = "s3Location"
        }
    }

    public struct PackageVersionSummary: AWSDecodableShape {
        /// The date that the package version was created.
        public let creationDate: Date?
        /// The date that the package version was last updated.
        public let lastModifiedDate: Date?
        /// The name of the associated software package.
        public let packageName: String?
        /// The status of the package version. For more information, see Package version lifecycle.
        public let status: PackageVersionStatus?
        /// The name of the target package version.
        public let versionName: String?

        @inlinable
        public init(creationDate: Date? = nil, lastModifiedDate: Date? = nil, packageName: String? = nil, status: PackageVersionStatus? = nil, versionName: String? = nil) {
            self.creationDate = creationDate
            self.lastModifiedDate = lastModifiedDate
            self.packageName = packageName
            self.status = status
            self.versionName = versionName
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
            case lastModifiedDate = "lastModifiedDate"
            case packageName = "packageName"
            case status = "status"
            case versionName = "versionName"
        }
    }

    public struct PercentPair: AWSDecodableShape {
        /// The percentile.
        public let percent: Double?
        /// The value of the percentile.
        public let value: Double?

        @inlinable
        public init(percent: Double? = nil, value: Double? = nil) {
            self.percent = percent
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case percent = "percent"
            case value = "value"
        }
    }

    public struct Policy: AWSDecodableShape {
        /// The policy ARN.
        public let policyArn: String?
        /// The policy name.
        public let policyName: String?

        @inlinable
        public init(policyArn: String? = nil, policyName: String? = nil) {
            self.policyArn = policyArn
            self.policyName = policyName
        }

        private enum CodingKeys: String, CodingKey {
            case policyArn = "policyArn"
            case policyName = "policyName"
        }
    }

    public struct PolicyVersion: AWSDecodableShape {
        /// The date and time the policy was created.
        public let createDate: Date?
        /// Specifies whether the policy version is the default.
        public let isDefaultVersion: Bool?
        /// The policy version ID.
        public let versionId: String?

        @inlinable
        public init(createDate: Date? = nil, isDefaultVersion: Bool? = nil, versionId: String? = nil) {
            self.createDate = createDate
            self.isDefaultVersion = isDefaultVersion
            self.versionId = versionId
        }

        private enum CodingKeys: String, CodingKey {
            case createDate = "createDate"
            case isDefaultVersion = "isDefaultVersion"
            case versionId = "versionId"
        }
    }

    public struct PolicyVersionIdentifier: AWSEncodableShape & AWSDecodableShape {
        /// The name of the policy.
        public let policyName: String?
        /// The ID of the version of the policy associated with the resource.
        public let policyVersionId: String?

        @inlinable
        public init(policyName: String? = nil, policyVersionId: String? = nil) {
            self.policyName = policyName
            self.policyVersionId = policyVersionId
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[\\w+=,.@-]+$")
            try self.validate(self.policyVersionId, name: "policyVersionId", parent: name, pattern: "^[0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case policyName = "policyName"
            case policyVersionId = "policyVersionId"
        }
    }

    public struct PresignedUrlConfig: AWSEncodableShape & AWSDecodableShape {
        /// How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 3600 seconds. Pre-signed URLs are generated when Jobs receives an MQTT request for the job document.
        public let expiresInSec: Int64?
        /// The ARN of an IAM role that grants permission to download files from the S3 bucket where the job data/updates are stored. The role must also grant permission for IoT to download the files.  For information about addressing the confused deputy problem, see cross-service confused deputy prevention in the Amazon Web Services IoT Core developer guide.
        public let roleArn: String?

        @inlinable
        public init(expiresInSec: Int64? = nil, roleArn: String? = nil) {
            self.expiresInSec = expiresInSec
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.expiresInSec, name: "expiresInSec", parent: name, max: 3600)
            try self.validate(self.expiresInSec, name: "expiresInSec", parent: name, min: 60)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case expiresInSec = "expiresInSec"
            case roleArn = "roleArn"
        }
    }

    public struct PrincipalThingObject: AWSDecodableShape {
        /// The name of the thing.
        public let thingName: String
        /// The type of the relation you want to specify when you attach a principal to a thing.
        /// 				The value defaults to NON_EXCLUSIVE_THING.    EXCLUSIVE_THING - Attaches the specified principal to the specified thing, exclusively.
        /// 						The thing will be the only thing that’s attached to the principal.      NON_EXCLUSIVE_THING - Attaches the specified principal to the specified thing.
        /// 						Multiple things can be attached to the principal.
        public let thingPrincipalType: ThingPrincipalType?

        @inlinable
        public init(thingName: String, thingPrincipalType: ThingPrincipalType? = nil) {
            self.thingName = thingName
            self.thingPrincipalType = thingPrincipalType
        }

        private enum CodingKeys: String, CodingKey {
            case thingName = "thingName"
            case thingPrincipalType = "thingPrincipalType"
        }
    }

    public struct PropagatingAttribute: AWSEncodableShape & AWSDecodableShape {
        /// The attribute associated with the connection between a device and Amazon Web Services IoT Core.
        public let connectionAttribute: String?
        /// The user-defined thing attribute that is propagating for MQTT 5 message enrichment.
        public let thingAttribute: String?
        /// The key of the user property key-value pair.
        public let userPropertyKey: String?

        @inlinable
        public init(connectionAttribute: String? = nil, thingAttribute: String? = nil, userPropertyKey: String? = nil) {
            self.connectionAttribute = connectionAttribute
            self.thingAttribute = thingAttribute
            self.userPropertyKey = userPropertyKey
        }

        public func validate(name: String) throws {
            try self.validate(self.connectionAttribute, name: "connectionAttribute", parent: name, max: 128)
            try self.validate(self.connectionAttribute, name: "connectionAttribute", parent: name, pattern: "^[a-zA-Z0-9:.]+$")
            try self.validate(self.thingAttribute, name: "thingAttribute", parent: name, max: 128)
            try self.validate(self.thingAttribute, name: "thingAttribute", parent: name, pattern: "^[a-zA-Z0-9_.,@/:#-]+$")
            try self.validate(self.userPropertyKey, name: "userPropertyKey", parent: name, max: 128)
            try self.validate(self.userPropertyKey, name: "userPropertyKey", parent: name, pattern: "^[a-zA-Z0-9:$.]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case connectionAttribute = "connectionAttribute"
            case thingAttribute = "thingAttribute"
            case userPropertyKey = "userPropertyKey"
        }
    }

    public struct ProvisioningHook: AWSEncodableShape & AWSDecodableShape {
        /// The payload that was sent to the target function.  Note: Only Lambda functions are currently supported.
        public let payloadVersion: String?
        /// The ARN of the target function.  Note: Only Lambda functions are currently supported.
        public let targetArn: String

        @inlinable
        public init(payloadVersion: String? = nil, targetArn: String) {
            self.payloadVersion = payloadVersion
            self.targetArn = targetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.payloadVersion, name: "payloadVersion", parent: name, max: 32)
            try self.validate(self.payloadVersion, name: "payloadVersion", parent: name, min: 10)
            try self.validate(self.payloadVersion, name: "payloadVersion", parent: name, pattern: "^[0-9-]+$")
            try self.validate(self.targetArn, name: "targetArn", parent: name, max: 2048)
        }

        private enum CodingKeys: String, CodingKey {
            case payloadVersion = "payloadVersion"
            case targetArn = "targetArn"
        }
    }

    public struct ProvisioningTemplateSummary: AWSDecodableShape {
        /// The date when the provisioning template summary was created.
        public let creationDate: Date?
        /// The description of the provisioning template.
        public let description: String?
        /// True if the fleet provision template is enabled, otherwise false.
        public let enabled: Bool?
        /// The date when the provisioning template summary was last modified.
        public let lastModifiedDate: Date?
        /// The ARN of the provisioning template.
        public let templateArn: String?
        /// The name of the provisioning template.
        public let templateName: String?
        /// The type you define in a provisioning template. You can create a template with only one type. You can't change the template type after its creation. The default value is FLEET_PROVISIONING. For more information about provisioning template, see: Provisioning template.
        public let type: TemplateType?

        @inlinable
        public init(creationDate: Date? = nil, description: String? = nil, enabled: Bool? = nil, lastModifiedDate: Date? = nil, templateArn: String? = nil, templateName: String? = nil, type: TemplateType? = nil) {
            self.creationDate = creationDate
            self.description = description
            self.enabled = enabled
            self.lastModifiedDate = lastModifiedDate
            self.templateArn = templateArn
            self.templateName = templateName
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
            case description = "description"
            case enabled = "enabled"
            case lastModifiedDate = "lastModifiedDate"
            case templateArn = "templateArn"
            case templateName = "templateName"
            case type = "type"
        }
    }

    public struct ProvisioningTemplateVersionSummary: AWSDecodableShape {
        /// The date when the provisioning template version was created
        public let creationDate: Date?
        /// True if the provisioning template version is the default version, otherwise false.
        public let isDefaultVersion: Bool?
        /// The ID of the fleet provisioning template version.
        public let versionId: Int?

        @inlinable
        public init(creationDate: Date? = nil, isDefaultVersion: Bool? = nil, versionId: Int? = nil) {
            self.creationDate = creationDate
            self.isDefaultVersion = isDefaultVersion
            self.versionId = versionId
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
            case isDefaultVersion = "isDefaultVersion"
            case versionId = "versionId"
        }
    }

    public struct PublishFindingToSnsParams: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the topic to which you want to publish the findings.
        public let topicArn: String

        @inlinable
        public init(topicArn: String) {
            self.topicArn = topicArn
        }

        public func validate(name: String) throws {
            try self.validate(self.topicArn, name: "topicArn", parent: name, max: 350)
        }

        private enum CodingKeys: String, CodingKey {
            case topicArn = "topicArn"
        }
    }

    public struct PutAssetPropertyValueEntry: AWSEncodableShape & AWSDecodableShape {
        /// The ID of the IoT SiteWise asset. You must specify either a propertyAlias or both an aliasId and a propertyId. Accepts substitution templates.
        public let assetId: String?
        /// Optional. A unique identifier for this entry that you can define to better track which message caused an error in case of failure. Accepts substitution templates. Defaults to a new UUID.
        public let entryId: String?
        /// The name of the property alias associated with your asset property. You must specify either a propertyAlias or both an aliasId and a propertyId. Accepts substitution templates.
        public let propertyAlias: String?
        /// The ID of the asset's property. You must specify either a propertyAlias or both an aliasId and a propertyId. Accepts substitution templates.
        public let propertyId: String?
        /// A list of property values to insert that each contain timestamp, quality, and value (TQV) information.
        public let propertyValues: [AssetPropertyValue]

        @inlinable
        public init(assetId: String? = nil, entryId: String? = nil, propertyAlias: String? = nil, propertyId: String? = nil, propertyValues: [AssetPropertyValue]) {
            self.assetId = assetId
            self.entryId = entryId
            self.propertyAlias = propertyAlias
            self.propertyId = propertyId
            self.propertyValues = propertyValues
        }

        public func validate(name: String) throws {
            try self.validate(self.propertyAlias, name: "propertyAlias", parent: name, min: 1)
            try self.propertyValues.forEach {
                try $0.validate(name: "\(name).propertyValues[]")
            }
            try self.validate(self.propertyValues, name: "propertyValues", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case assetId = "assetId"
            case entryId = "entryId"
            case propertyAlias = "propertyAlias"
            case propertyId = "propertyId"
            case propertyValues = "propertyValues"
        }
    }

    public struct PutItemInput: AWSEncodableShape & AWSDecodableShape {
        /// The table where the message data will be written.
        public let tableName: String

        @inlinable
        public init(tableName: String) {
            self.tableName = tableName
        }

        private enum CodingKeys: String, CodingKey {
            case tableName = "tableName"
        }
    }

    public struct PutVerificationStateOnViolationRequest: AWSEncodableShape {
        /// The verification state of the violation.
        public let verificationState: VerificationState
        /// The description of the verification state of the violation (detect alarm).
        public let verificationStateDescription: String?
        /// The violation ID.
        public let violationId: String

        @inlinable
        public init(verificationState: VerificationState, verificationStateDescription: String? = nil, violationId: String) {
            self.verificationState = verificationState
            self.verificationStateDescription = verificationStateDescription
            self.violationId = violationId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.verificationState, forKey: .verificationState)
            try container.encodeIfPresent(self.verificationStateDescription, forKey: .verificationStateDescription)
            request.encodePath(self.violationId, key: "violationId")
        }

        public func validate(name: String) throws {
            try self.validate(self.verificationStateDescription, name: "verificationStateDescription", parent: name, max: 1000)
            try self.validate(self.verificationStateDescription, name: "verificationStateDescription", parent: name, pattern: "^[^\\p{Cntrl}]*$")
            try self.validate(self.violationId, name: "violationId", parent: name, max: 128)
            try self.validate(self.violationId, name: "violationId", parent: name, min: 1)
            try self.validate(self.violationId, name: "violationId", parent: name, pattern: "^[a-zA-Z0-9\\-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case verificationState = "verificationState"
            case verificationStateDescription = "verificationStateDescription"
        }
    }

    public struct PutVerificationStateOnViolationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct RateIncreaseCriteria: AWSEncodableShape & AWSDecodableShape {
        /// The threshold for number of notified things that will initiate the increase in rate of rollout.
        public let numberOfNotifiedThings: Int?
        /// The threshold for number of succeeded things that will initiate the increase in rate of rollout.
        public let numberOfSucceededThings: Int?

        @inlinable
        public init(numberOfNotifiedThings: Int? = nil, numberOfSucceededThings: Int? = nil) {
            self.numberOfNotifiedThings = numberOfNotifiedThings
            self.numberOfSucceededThings = numberOfSucceededThings
        }

        public func validate(name: String) throws {
            try self.validate(self.numberOfNotifiedThings, name: "numberOfNotifiedThings", parent: name, min: 1)
            try self.validate(self.numberOfSucceededThings, name: "numberOfSucceededThings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case numberOfNotifiedThings = "numberOfNotifiedThings"
            case numberOfSucceededThings = "numberOfSucceededThings"
        }
    }

    public struct RegisterCACertificateRequest: AWSEncodableShape {
        /// Allows this CA certificate to be used for auto registration of device certificates.
        public let allowAutoRegistration: Bool?
        /// The CA certificate.
        public let caCertificate: String
        /// Describes the certificate mode in which the Certificate Authority (CA) will be registered. If the verificationCertificate field is not provided, set certificateMode to be SNI_ONLY. If the verificationCertificate field is provided, set certificateMode to be DEFAULT. When certificateMode is not provided, it defaults to DEFAULT. All the device certificates that are registered using this CA will be registered in the same certificate mode as the CA. For more information about certificate mode for device certificates, see   certificate mode.
        public let certificateMode: CertificateMode?
        /// Information about the registration configuration.
        public let registrationConfig: RegistrationConfig?
        /// A boolean value that specifies if the CA certificate is set to active. Valid values: ACTIVE | INACTIVE
        public let setAsActive: Bool?
        /// Metadata which can be used to manage the CA certificate.  For URI Request parameters use format: ...key1=value1&key2=value2... For the CLI command-line parameter use format: &&tags "key1=value1&key2=value2..." For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
        public let tags: [Tag]?
        /// The private key verification certificate. If certificateMode is SNI_ONLY, the verificationCertificate field must be empty. If certificateMode is DEFAULT or not provided, the verificationCertificate field must not be empty.
        public let verificationCertificate: String?

        @inlinable
        public init(allowAutoRegistration: Bool? = nil, caCertificate: String, certificateMode: CertificateMode? = nil, registrationConfig: RegistrationConfig? = nil, setAsActive: Bool? = nil, tags: [Tag]? = nil, verificationCertificate: String? = nil) {
            self.allowAutoRegistration = allowAutoRegistration
            self.caCertificate = caCertificate
            self.certificateMode = certificateMode
            self.registrationConfig = registrationConfig
            self.setAsActive = setAsActive
            self.tags = tags
            self.verificationCertificate = verificationCertificate
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.allowAutoRegistration, key: "allowAutoRegistration")
            try container.encode(self.caCertificate, forKey: .caCertificate)
            try container.encodeIfPresent(self.certificateMode, forKey: .certificateMode)
            try container.encodeIfPresent(self.registrationConfig, forKey: .registrationConfig)
            request.encodeQuery(self.setAsActive, key: "setAsActive")
            try container.encodeIfPresent(self.tags, forKey: .tags)
            try container.encodeIfPresent(self.verificationCertificate, forKey: .verificationCertificate)
        }

        public func validate(name: String) throws {
            try self.validate(self.caCertificate, name: "caCertificate", parent: name, max: 65536)
            try self.validate(self.caCertificate, name: "caCertificate", parent: name, min: 1)
            try self.validate(self.caCertificate, name: "caCertificate", parent: name, pattern: "^[\\s\\S]*$")
            try self.registrationConfig?.validate(name: "\(name).registrationConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.verificationCertificate, name: "verificationCertificate", parent: name, max: 65536)
            try self.validate(self.verificationCertificate, name: "verificationCertificate", parent: name, min: 1)
            try self.validate(self.verificationCertificate, name: "verificationCertificate", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case caCertificate = "caCertificate"
            case certificateMode = "certificateMode"
            case registrationConfig = "registrationConfig"
            case tags = "tags"
            case verificationCertificate = "verificationCertificate"
        }
    }

    public struct RegisterCACertificateResponse: AWSDecodableShape {
        /// The CA certificate ARN.
        public let certificateArn: String?
        /// The CA certificate identifier.
        public let certificateId: String?

        @inlinable
        public init(certificateArn: String? = nil, certificateId: String? = nil) {
            self.certificateArn = certificateArn
            self.certificateId = certificateId
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn = "certificateArn"
            case certificateId = "certificateId"
        }
    }

    public struct RegisterCertificateRequest: AWSEncodableShape {
        /// The CA certificate used to sign the device certificate being registered.
        public let caCertificatePem: String?
        /// The certificate data, in PEM format.
        public let certificatePem: String
        /// A boolean value that specifies if the certificate is set to active. Valid values: ACTIVE | INACTIVE
        public let setAsActive: Bool?
        /// The status of the register certificate request. Valid values that you can use include  ACTIVE, INACTIVE, and REVOKED.
        public let status: CertificateStatus?

        @inlinable
        public init(caCertificatePem: String? = nil, certificatePem: String, status: CertificateStatus? = nil) {
            self.caCertificatePem = caCertificatePem
            self.certificatePem = certificatePem
            self.setAsActive = nil
            self.status = status
        }

        @available(*, deprecated, message: "Members setAsActive have been deprecated")
        @inlinable
        public init(caCertificatePem: String? = nil, certificatePem: String, setAsActive: Bool? = nil, status: CertificateStatus? = nil) {
            self.caCertificatePem = caCertificatePem
            self.certificatePem = certificatePem
            self.setAsActive = setAsActive
            self.status = status
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.caCertificatePem, forKey: .caCertificatePem)
            try container.encode(self.certificatePem, forKey: .certificatePem)
            request.encodeQuery(self.setAsActive, key: "setAsActive")
            try container.encodeIfPresent(self.status, forKey: .status)
        }

        public func validate(name: String) throws {
            try self.validate(self.caCertificatePem, name: "caCertificatePem", parent: name, max: 65536)
            try self.validate(self.caCertificatePem, name: "caCertificatePem", parent: name, min: 1)
            try self.validate(self.caCertificatePem, name: "caCertificatePem", parent: name, pattern: "^[\\s\\S]*$")
            try self.validate(self.certificatePem, name: "certificatePem", parent: name, max: 65536)
            try self.validate(self.certificatePem, name: "certificatePem", parent: name, min: 1)
            try self.validate(self.certificatePem, name: "certificatePem", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case caCertificatePem = "caCertificatePem"
            case certificatePem = "certificatePem"
            case status = "status"
        }
    }

    public struct RegisterCertificateResponse: AWSDecodableShape {
        /// The certificate ARN.
        public let certificateArn: String?
        /// The certificate identifier.
        public let certificateId: String?

        @inlinable
        public init(certificateArn: String? = nil, certificateId: String? = nil) {
            self.certificateArn = certificateArn
            self.certificateId = certificateId
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn = "certificateArn"
            case certificateId = "certificateId"
        }
    }

    public struct RegisterCertificateWithoutCARequest: AWSEncodableShape {
        /// The certificate data, in PEM format.
        public let certificatePem: String
        /// The status of the register certificate request.
        public let status: CertificateStatus?

        @inlinable
        public init(certificatePem: String, status: CertificateStatus? = nil) {
            self.certificatePem = certificatePem
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.certificatePem, name: "certificatePem", parent: name, max: 65536)
            try self.validate(self.certificatePem, name: "certificatePem", parent: name, min: 1)
            try self.validate(self.certificatePem, name: "certificatePem", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case certificatePem = "certificatePem"
            case status = "status"
        }
    }

    public struct RegisterCertificateWithoutCAResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the registered certificate.
        public let certificateArn: String?
        /// The ID of the registered certificate. (The last part of the certificate ARN contains the certificate ID.
        public let certificateId: String?

        @inlinable
        public init(certificateArn: String? = nil, certificateId: String? = nil) {
            self.certificateArn = certificateArn
            self.certificateId = certificateId
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn = "certificateArn"
            case certificateId = "certificateId"
        }
    }

    public struct RegisterThingRequest: AWSEncodableShape {
        /// The parameters for provisioning a thing. See Provisioning Templates for more information.
        public let parameters: [String: String]?
        /// The provisioning template. See Provisioning Devices That Have Device Certificates for more information.
        public let templateBody: String

        @inlinable
        public init(parameters: [String: String]? = nil, templateBody: String) {
            self.parameters = parameters
            self.templateBody = templateBody
        }

        public func validate(name: String) throws {
            try self.parameters?.forEach {
                try validate($0.key, name: "parameters.key", parent: name, max: 2048)
                try validate($0.key, name: "parameters.key", parent: name, pattern: "^[\\s\\S]*$")
                try validate($0.value, name: "parameters[\"\($0.key)\"]", parent: name, max: 4096)
                try validate($0.value, name: "parameters[\"\($0.key)\"]", parent: name, pattern: "^[\\s\\S]*$")
            }
            try self.validate(self.templateBody, name: "templateBody", parent: name, max: 10240)
            try self.validate(self.templateBody, name: "templateBody", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case parameters = "parameters"
            case templateBody = "templateBody"
        }
    }

    public struct RegisterThingResponse: AWSDecodableShape {
        /// The certificate data, in PEM format.
        public let certificatePem: String?
        /// ARNs for the generated resources.
        public let resourceArns: [String: String]?

        @inlinable
        public init(certificatePem: String? = nil, resourceArns: [String: String]? = nil) {
            self.certificatePem = certificatePem
            self.resourceArns = resourceArns
        }

        private enum CodingKeys: String, CodingKey {
            case certificatePem = "certificatePem"
            case resourceArns = "resourceArns"
        }
    }

    public struct RegistrationConfig: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the role.
        public let roleArn: String?
        /// The template body.
        public let templateBody: String?
        /// The name of the provisioning template.
        public let templateName: String?

        @inlinable
        public init(roleArn: String? = nil, templateBody: String? = nil, templateName: String? = nil) {
            self.roleArn = roleArn
            self.templateBody = templateBody
            self.templateName = templateName
        }

        public func validate(name: String) throws {
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.templateBody, name: "templateBody", parent: name, max: 10240)
            try self.validate(self.templateBody, name: "templateBody", parent: name, pattern: "^[\\s\\S]*$")
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case roleArn = "roleArn"
            case templateBody = "templateBody"
            case templateName = "templateName"
        }
    }

    public struct RejectCertificateTransferRequest: AWSEncodableShape {
        /// The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String
        /// The reason the certificate transfer was rejected.
        public let rejectReason: String?

        @inlinable
        public init(certificateId: String, rejectReason: String? = nil) {
            self.certificateId = certificateId
            self.rejectReason = rejectReason
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.certificateId, key: "certificateId")
            try container.encodeIfPresent(self.rejectReason, forKey: .rejectReason)
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "^(0x)?[a-fA-F0-9]+$")
            try self.validate(self.rejectReason, name: "rejectReason", parent: name, max: 128)
            try self.validate(self.rejectReason, name: "rejectReason", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case rejectReason = "rejectReason"
        }
    }

    public struct RelatedResource: AWSDecodableShape {
        /// Other information about the resource.
        public let additionalInfo: [String: String]?
        /// Information that identifies the resource.
        public let resourceIdentifier: ResourceIdentifier?
        /// The type of resource.
        public let resourceType: ResourceType?

        @inlinable
        public init(additionalInfo: [String: String]? = nil, resourceIdentifier: ResourceIdentifier? = nil, resourceType: ResourceType? = nil) {
            self.additionalInfo = additionalInfo
            self.resourceIdentifier = resourceIdentifier
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case additionalInfo = "additionalInfo"
            case resourceIdentifier = "resourceIdentifier"
            case resourceType = "resourceType"
        }
    }

    public struct RemoveThingFromBillingGroupRequest: AWSEncodableShape {
        /// The ARN of the billing group.
        public let billingGroupArn: String?
        /// The name of the billing group.
        public let billingGroupName: String?
        /// The ARN of the thing to be removed from the billing group.
        public let thingArn: String?
        /// The name of the thing to be removed from the billing group.
        public let thingName: String?

        @inlinable
        public init(billingGroupArn: String? = nil, billingGroupName: String? = nil, thingArn: String? = nil, thingName: String? = nil) {
            self.billingGroupArn = billingGroupArn
            self.billingGroupName = billingGroupName
            self.thingArn = thingArn
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, max: 128)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, min: 1)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case billingGroupArn = "billingGroupArn"
            case billingGroupName = "billingGroupName"
            case thingArn = "thingArn"
            case thingName = "thingName"
        }
    }

    public struct RemoveThingFromBillingGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct RemoveThingFromThingGroupRequest: AWSEncodableShape {
        /// The ARN of the thing to remove from the group.
        public let thingArn: String?
        /// The group ARN.
        public let thingGroupArn: String?
        /// The group name.
        public let thingGroupName: String?
        /// The name of the thing to remove from the group.
        public let thingName: String?

        @inlinable
        public init(thingArn: String? = nil, thingGroupArn: String? = nil, thingGroupName: String? = nil, thingName: String? = nil) {
            self.thingArn = thingArn
            self.thingGroupArn = thingGroupArn
            self.thingGroupName = thingGroupName
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case thingArn = "thingArn"
            case thingGroupArn = "thingGroupArn"
            case thingGroupName = "thingGroupName"
            case thingName = "thingName"
        }
    }

    public struct RemoveThingFromThingGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct ReplaceDefaultPolicyVersionParams: AWSEncodableShape & AWSDecodableShape {
        /// The name of the template to be applied. The only supported value is BLANK_POLICY.
        public let templateName: PolicyTemplateName

        @inlinable
        public init(templateName: PolicyTemplateName) {
            self.templateName = templateName
        }

        private enum CodingKeys: String, CodingKey {
            case templateName = "templateName"
        }
    }

    public struct ReplaceTopicRuleRequest: AWSEncodableShape {
        /// The name of the rule.
        public let ruleName: String
        /// The rule payload.
        public let topicRulePayload: TopicRulePayload

        @inlinable
        public init(ruleName: String, topicRulePayload: TopicRulePayload) {
            self.ruleName = ruleName
            self.topicRulePayload = topicRulePayload
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.singleValueContainer()
            request.encodePath(self.ruleName, key: "ruleName")
            try container.encode(self.topicRulePayload)
        }

        public func validate(name: String) throws {
            try self.validate(self.ruleName, name: "ruleName", parent: name, max: 128)
            try self.validate(self.ruleName, name: "ruleName", parent: name, min: 1)
            try self.validate(self.ruleName, name: "ruleName", parent: name, pattern: "^[a-zA-Z0-9_]+$")
            try self.topicRulePayload.validate(name: "\(name).topicRulePayload")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct RepublishAction: AWSEncodableShape & AWSDecodableShape {
        /// MQTT Version 5.0 headers information. For more information, see  MQTT from the Amazon Web Services IoT Core Developer Guide.
        public let headers: MqttHeaders?
        /// The Quality of Service (QoS) level to use when republishing messages. The default value is 0.
        public let qos: Int?
        /// The ARN of the IAM role that grants access.
        public let roleArn: String
        /// The name of the MQTT topic.
        public let topic: String

        @inlinable
        public init(headers: MqttHeaders? = nil, qos: Int? = nil, roleArn: String, topic: String) {
            self.headers = headers
            self.qos = qos
            self.roleArn = roleArn
            self.topic = topic
        }

        public func validate(name: String) throws {
            try self.headers?.validate(name: "\(name).headers")
            try self.validate(self.qos, name: "qos", parent: name, max: 1)
            try self.validate(self.qos, name: "qos", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case headers = "headers"
            case qos = "qos"
            case roleArn = "roleArn"
            case topic = "topic"
        }
    }

    public struct ResourceAlreadyExistsException: AWSErrorShape {
        /// The message for the exception.
        public let message: String?
        /// The ARN of the resource that caused the exception.
        public let resourceArn: String?
        /// The ID of the resource that caused the exception.
        public let resourceId: String?

        @inlinable
        public init(message: String? = nil, resourceArn: String? = nil, resourceId: String? = nil) {
            self.message = message
            self.resourceArn = resourceArn
            self.resourceId = resourceId
        }

        private enum CodingKeys: String, CodingKey {
            case message = "message"
            case resourceArn = "resourceArn"
            case resourceId = "resourceId"
        }
    }

    public struct ResourceIdentifier: AWSEncodableShape & AWSDecodableShape {
        /// The account with which the resource is associated.
        public let account: String?
        /// The ID of the CA certificate used to authorize the certificate.
        public let caCertificateId: String?
        /// The client ID.
        public let clientId: String?
        /// The ID of the Amazon Cognito identity pool.
        public let cognitoIdentityPoolId: String?
        /// The ARN of the identified device certificate.
        public let deviceCertificateArn: String?
        /// The ID of the certificate attached to the resource.
        public let deviceCertificateId: String?
        /// The ARN of the IAM role that has overly permissive actions.
        public let iamRoleArn: String?
        /// The issuer certificate identifier.
        public let issuerCertificateIdentifier: IssuerCertificateIdentifier?
        /// The version of the policy associated with the resource.
        public let policyVersionIdentifier: PolicyVersionIdentifier?
        /// The ARN of the role alias that has overly permissive actions.
        public let roleAliasArn: String?

        @inlinable
        public init(account: String? = nil, caCertificateId: String? = nil, clientId: String? = nil, cognitoIdentityPoolId: String? = nil, deviceCertificateArn: String? = nil, deviceCertificateId: String? = nil, iamRoleArn: String? = nil, issuerCertificateIdentifier: IssuerCertificateIdentifier? = nil, policyVersionIdentifier: PolicyVersionIdentifier? = nil, roleAliasArn: String? = nil) {
            self.account = account
            self.caCertificateId = caCertificateId
            self.clientId = clientId
            self.cognitoIdentityPoolId = cognitoIdentityPoolId
            self.deviceCertificateArn = deviceCertificateArn
            self.deviceCertificateId = deviceCertificateId
            self.iamRoleArn = iamRoleArn
            self.issuerCertificateIdentifier = issuerCertificateIdentifier
            self.policyVersionIdentifier = policyVersionIdentifier
            self.roleAliasArn = roleAliasArn
        }

        public func validate(name: String) throws {
            try self.validate(self.account, name: "account", parent: name, max: 12)
            try self.validate(self.account, name: "account", parent: name, min: 12)
            try self.validate(self.account, name: "account", parent: name, pattern: "^[0-9]+$")
            try self.validate(self.caCertificateId, name: "caCertificateId", parent: name, max: 64)
            try self.validate(self.caCertificateId, name: "caCertificateId", parent: name, min: 64)
            try self.validate(self.caCertificateId, name: "caCertificateId", parent: name, pattern: "^(0x)?[a-fA-F0-9]+$")
            try self.validate(self.deviceCertificateId, name: "deviceCertificateId", parent: name, max: 64)
            try self.validate(self.deviceCertificateId, name: "deviceCertificateId", parent: name, min: 64)
            try self.validate(self.deviceCertificateId, name: "deviceCertificateId", parent: name, pattern: "^(0x)?[a-fA-F0-9]+$")
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, max: 2048)
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, min: 20)
            try self.issuerCertificateIdentifier?.validate(name: "\(name).issuerCertificateIdentifier")
            try self.policyVersionIdentifier?.validate(name: "\(name).policyVersionIdentifier")
            try self.validate(self.roleAliasArn, name: "roleAliasArn", parent: name, max: 2048)
            try self.validate(self.roleAliasArn, name: "roleAliasArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case account = "account"
            case caCertificateId = "caCertificateId"
            case clientId = "clientId"
            case cognitoIdentityPoolId = "cognitoIdentityPoolId"
            case deviceCertificateArn = "deviceCertificateArn"
            case deviceCertificateId = "deviceCertificateId"
            case iamRoleArn = "iamRoleArn"
            case issuerCertificateIdentifier = "issuerCertificateIdentifier"
            case policyVersionIdentifier = "policyVersionIdentifier"
            case roleAliasArn = "roleAliasArn"
        }
    }

    public struct RetryCriteria: AWSEncodableShape & AWSDecodableShape {
        /// The type of job execution failures that can initiate a job retry.
        public let failureType: RetryableFailureType
        /// The number of retries allowed for a failure type for the job.
        public let numberOfRetries: Int

        @inlinable
        public init(failureType: RetryableFailureType, numberOfRetries: Int) {
            self.failureType = failureType
            self.numberOfRetries = numberOfRetries
        }

        public func validate(name: String) throws {
            try self.validate(self.numberOfRetries, name: "numberOfRetries", parent: name, max: 10)
            try self.validate(self.numberOfRetries, name: "numberOfRetries", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case failureType = "failureType"
            case numberOfRetries = "numberOfRetries"
        }
    }

    public struct RoleAliasDescription: AWSDecodableShape {
        /// The UNIX timestamp of when the role alias was created.
        public let creationDate: Date?
        /// The number of seconds for which the credential is valid.
        public let credentialDurationSeconds: Int?
        /// The UNIX timestamp of when the role alias was last modified.
        public let lastModifiedDate: Date?
        /// The role alias owner.
        public let owner: String?
        /// The role alias.
        public let roleAlias: String?
        /// The ARN of the role alias.
        public let roleAliasArn: String?
        /// The role ARN.
        public let roleArn: String?

        @inlinable
        public init(creationDate: Date? = nil, credentialDurationSeconds: Int? = nil, lastModifiedDate: Date? = nil, owner: String? = nil, roleAlias: String? = nil, roleAliasArn: String? = nil, roleArn: String? = nil) {
            self.creationDate = creationDate
            self.credentialDurationSeconds = credentialDurationSeconds
            self.lastModifiedDate = lastModifiedDate
            self.owner = owner
            self.roleAlias = roleAlias
            self.roleAliasArn = roleAliasArn
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
            case credentialDurationSeconds = "credentialDurationSeconds"
            case lastModifiedDate = "lastModifiedDate"
            case owner = "owner"
            case roleAlias = "roleAlias"
            case roleAliasArn = "roleAliasArn"
            case roleArn = "roleArn"
        }
    }

    public struct S3Action: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon S3 bucket.
        public let bucketName: String
        /// The Amazon S3 canned ACL that controls access to the object identified by the object key. For more information, see S3 canned ACLs.
        public let cannedAcl: CannedAccessControlList?
        /// The object key. For more information, see Actions, resources, and condition keys for Amazon S3.
        public let key: String
        /// The ARN of the IAM role that grants access.
        public let roleArn: String

        @inlinable
        public init(bucketName: String, cannedAcl: CannedAccessControlList? = nil, key: String, roleArn: String) {
            self.bucketName = bucketName
            self.cannedAcl = cannedAcl
            self.key = key
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case bucketName = "bucketName"
            case cannedAcl = "cannedAcl"
            case key = "key"
            case roleArn = "roleArn"
        }
    }

    public struct S3Destination: AWSEncodableShape & AWSDecodableShape {
        /// The S3 bucket that contains the updated firmware.
        public let bucket: String?
        /// The S3 prefix.
        public let prefix: String?

        @inlinable
        public init(bucket: String? = nil, prefix: String? = nil) {
            self.bucket = bucket
            self.prefix = prefix
        }

        public func validate(name: String) throws {
            try self.validate(self.bucket, name: "bucket", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case bucket = "bucket"
            case prefix = "prefix"
        }
    }

    public struct S3Location: AWSEncodableShape & AWSDecodableShape {
        /// The S3 bucket.
        public let bucket: String?
        /// The S3 key.
        public let key: String?
        /// The S3 bucket version.
        public let version: String?

        @inlinable
        public init(bucket: String? = nil, key: String? = nil, version: String? = nil) {
            self.bucket = bucket
            self.key = key
            self.version = version
        }

        public func validate(name: String) throws {
            try self.validate(self.bucket, name: "bucket", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case bucket = "bucket"
            case key = "key"
            case version = "version"
        }
    }

    public struct SalesforceAction: AWSEncodableShape & AWSDecodableShape {
        /// The token used to authenticate access to the Salesforce IoT Cloud Input Stream. The token is available from the Salesforce IoT Cloud platform after creation of the Input Stream.
        public let token: String
        /// The URL exposed by the Salesforce IoT Cloud Input Stream. The URL is available from the Salesforce IoT Cloud platform after creation of the Input Stream.
        public let url: String

        @inlinable
        public init(token: String, url: String) {
            self.token = token
            self.url = url
        }

        public func validate(name: String) throws {
            try self.validate(self.token, name: "token", parent: name, min: 40)
            try self.validate(self.url, name: "url", parent: name, max: 2000)
            try self.validate(self.url, name: "url", parent: name, pattern: "^https://ingestion-[a-zA-Z0-9]{1,12}\\.[a-zA-Z0-9]+\\.((sfdc-matrix\\.net)|(sfdcnow\\.com))/streams/\\w{1,20}/\\w{1,20}/event$")
        }

        private enum CodingKeys: String, CodingKey {
            case token = "token"
            case url = "url"
        }
    }

    public struct Sbom: AWSEncodableShape & AWSDecodableShape {
        public let s3Location: S3Location?

        @inlinable
        public init(s3Location: S3Location? = nil) {
            self.s3Location = s3Location
        }

        public func validate(name: String) throws {
            try self.s3Location?.validate(name: "\(name).s3Location")
        }

        private enum CodingKeys: String, CodingKey {
            case s3Location = "s3Location"
        }
    }

    public struct SbomValidationResultSummary: AWSDecodableShape {
        /// The errorCode representing the validation failure error if the SBOM validation failed.
        public let errorCode: SbomValidationErrorCode?
        /// The errorMessage representing the validation failure error if the SBOM validation failed.
        public let errorMessage: String?
        /// The name of the SBOM file.
        public let fileName: String?
        /// The end result of the SBOM validation.
        public let validationResult: SbomValidationResult?

        @inlinable
        public init(errorCode: SbomValidationErrorCode? = nil, errorMessage: String? = nil, fileName: String? = nil, validationResult: SbomValidationResult? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.fileName = fileName
            self.validationResult = validationResult
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "errorCode"
            case errorMessage = "errorMessage"
            case fileName = "fileName"
            case validationResult = "validationResult"
        }
    }

    public struct ScheduledAuditMetadata: AWSDecodableShape {
        /// The day of the month on which the scheduled audit is run (if the frequency is "MONTHLY"). If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.
        public let dayOfMonth: String?
        /// The day of the week on which the scheduled audit is run (if the frequency is "WEEKLY" or "BIWEEKLY").
        public let dayOfWeek: DayOfWeek?
        /// How often the scheduled audit occurs.
        public let frequency: AuditFrequency?
        /// The ARN of the scheduled audit.
        public let scheduledAuditArn: String?
        /// The name of the scheduled audit.
        public let scheduledAuditName: String?

        @inlinable
        public init(dayOfMonth: String? = nil, dayOfWeek: DayOfWeek? = nil, frequency: AuditFrequency? = nil, scheduledAuditArn: String? = nil, scheduledAuditName: String? = nil) {
            self.dayOfMonth = dayOfMonth
            self.dayOfWeek = dayOfWeek
            self.frequency = frequency
            self.scheduledAuditArn = scheduledAuditArn
            self.scheduledAuditName = scheduledAuditName
        }

        private enum CodingKeys: String, CodingKey {
            case dayOfMonth = "dayOfMonth"
            case dayOfWeek = "dayOfWeek"
            case frequency = "frequency"
            case scheduledAuditArn = "scheduledAuditArn"
            case scheduledAuditName = "scheduledAuditName"
        }
    }

    public struct ScheduledJobRollout: AWSDecodableShape {
        /// Displays the start times of the next seven maintenance window occurrences.
        public let startTime: String?

        @inlinable
        public init(startTime: String? = nil) {
            self.startTime = startTime
        }

        private enum CodingKeys: String, CodingKey {
            case startTime = "startTime"
        }
    }

    public struct SchedulingConfig: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the end behavior for all job executions after a job reaches the selected endTime. If endTime is not selected when creating the job, then endBehavior does not apply.
        public let endBehavior: JobEndBehavior?
        /// The time a job will stop rollout of the job document to all devices in the target group for a job. The endTime must take place no later than two years from the current time and be scheduled a minimum of thirty minutes from the current time. The minimum duration between startTime and endTime is thirty minutes. The maximum duration between startTime and endTime is two years. The date and time format for the endTime is YYYY-MM-DD for the date and HH:MM for the time. For more information on the syntax for endTime when using an API command or the Command Line Interface, see Timestamp.
        public let endTime: String?
        /// An optional configuration within the SchedulingConfig to setup a recurring maintenance window with a predetermined start time and duration for the rollout of a job document to all devices in a target group for a job.
        public let maintenanceWindows: [MaintenanceWindow]?
        /// The time a job will begin rollout of the job document to all devices in the target group for a job. The startTime can be scheduled up to a year in advance and must be scheduled a minimum of thirty minutes from the current time. The date and time format for the startTime is YYYY-MM-DD for the date and HH:MM for the time. For more information on the syntax for startTime when using an API command or the Command Line Interface, see Timestamp.
        public let startTime: String?

        @inlinable
        public init(endBehavior: JobEndBehavior? = nil, endTime: String? = nil, maintenanceWindows: [MaintenanceWindow]? = nil, startTime: String? = nil) {
            self.endBehavior = endBehavior
            self.endTime = endTime
            self.maintenanceWindows = maintenanceWindows
            self.startTime = startTime
        }

        public func validate(name: String) throws {
            try self.validate(self.endTime, name: "endTime", parent: name, max: 64)
            try self.validate(self.endTime, name: "endTime", parent: name, min: 1)
            try self.maintenanceWindows?.forEach {
                try $0.validate(name: "\(name).maintenanceWindows[]")
            }
            try self.validate(self.startTime, name: "startTime", parent: name, max: 64)
            try self.validate(self.startTime, name: "startTime", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case endBehavior = "endBehavior"
            case endTime = "endTime"
            case maintenanceWindows = "maintenanceWindows"
            case startTime = "startTime"
        }
    }

    public struct SearchIndexRequest: AWSEncodableShape {
        /// The search index name.
        public let indexName: String?
        /// The maximum number of results to return per page at one time. This maximum number cannot exceed 100. The response might contain fewer results but will never contain more. You can use  nextToken to retrieve the next set of results until nextToken returns NULL.
        public let maxResults: Int?
        /// The token used to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The search query string. For more information about the search query syntax, see Query syntax.
        public let queryString: String
        /// The query version.
        public let queryVersion: String?

        @inlinable
        public init(indexName: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, queryString: String, queryVersion: String? = nil) {
            self.indexName = indexName
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.queryString = queryString
            self.queryVersion = queryVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.indexName, name: "indexName", parent: name, max: 128)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case indexName = "indexName"
            case maxResults = "maxResults"
            case nextToken = "nextToken"
            case queryString = "queryString"
            case queryVersion = "queryVersion"
        }
    }

    public struct SearchIndexResponse: AWSDecodableShape {
        /// The token used to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The thing groups that match the search query.
        public let thingGroups: [ThingGroupDocument]?
        /// The things that match the search query.
        public let things: [ThingDocument]?

        @inlinable
        public init(nextToken: String? = nil, thingGroups: [ThingGroupDocument]? = nil, things: [ThingDocument]? = nil) {
            self.nextToken = nextToken
            self.thingGroups = thingGroups
            self.things = things
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "nextToken"
            case thingGroups = "thingGroups"
            case things = "things"
        }
    }

    public struct SecurityProfileIdentifier: AWSDecodableShape {
        /// The ARN of the security profile.
        public let arn: String
        /// The name you've given to the security profile.
        public let name: String

        @inlinable
        public init(arn: String, name: String) {
            self.arn = arn
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case name = "name"
        }
    }

    public struct SecurityProfileTarget: AWSDecodableShape {
        /// The ARN of the security profile.
        public let arn: String

        @inlinable
        public init(arn: String) {
            self.arn = arn
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
        }
    }

    public struct SecurityProfileTargetMapping: AWSDecodableShape {
        /// Information that identifies the security profile.
        public let securityProfileIdentifier: SecurityProfileIdentifier?
        /// Information about the target (thing group) associated with the security profile.
        public let target: SecurityProfileTarget?

        @inlinable
        public init(securityProfileIdentifier: SecurityProfileIdentifier? = nil, target: SecurityProfileTarget? = nil) {
            self.securityProfileIdentifier = securityProfileIdentifier
            self.target = target
        }

        private enum CodingKeys: String, CodingKey {
            case securityProfileIdentifier = "securityProfileIdentifier"
            case target = "target"
        }
    }

    public struct ServerCertificateConfig: AWSEncodableShape & AWSDecodableShape {
        /// A Boolean value that indicates whether Online Certificate Status Protocol (OCSP) server certificate check is enabled or not. For more information, see  Server certificate configuration for OCSP stapling from Amazon Web Services IoT Core Developer Guide.
        public let enableOCSPCheck: Bool?
        /// The Amazon Resource Name (ARN) for an X.509 certificate stored in Amazon Web Services Certificate Manager (ACM). If provided, Amazon Web Services IoT Core will use this certificate to validate the signature of the received OCSP response. The OCSP responder must sign responses using either this authorized responder certificate or the issuing certificate, depending on whether the ARN is provided or not. The certificate must be in the same Amazon Web Services account and region as the domain configuration.
        public let ocspAuthorizedResponderArn: String?
        /// The Amazon Resource Name (ARN) for a Lambda function that acts as a Request for Comments (RFC) 6960-compliant Online Certificate Status Protocol (OCSP) responder, supporting basic OCSP responses. The Lambda function accepts a base64-encoding of the OCSP request in the Distinguished Encoding Rules (DER) format. The Lambda function's response is also a base64-encoded OCSP response in the DER format. The response size must not exceed 4 kilobytes (KiB). The Lambda function must be in the same Amazon Web Services account and region as the domain configuration. For more information, see Configuring server certificate OCSP for private endpoints in Amazon Web Services IoT Core from the Amazon Web Services IoT Core developer guide.
        public let ocspLambdaArn: String?

        @inlinable
        public init(enableOCSPCheck: Bool? = nil, ocspAuthorizedResponderArn: String? = nil, ocspLambdaArn: String? = nil) {
            self.enableOCSPCheck = enableOCSPCheck
            self.ocspAuthorizedResponderArn = ocspAuthorizedResponderArn
            self.ocspLambdaArn = ocspLambdaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.ocspAuthorizedResponderArn, name: "ocspAuthorizedResponderArn", parent: name, max: 2048)
            try self.validate(self.ocspAuthorizedResponderArn, name: "ocspAuthorizedResponderArn", parent: name, min: 1)
            try self.validate(self.ocspAuthorizedResponderArn, name: "ocspAuthorizedResponderArn", parent: name, pattern: "^arn:aws(-cn|-us-gov|-iso-b|-iso)?:acm:[a-z]{2}-(gov-|iso-|isob-)?[a-z]{4,9}-\\d{1}:\\d{12}:certificate/[a-zA-Z0-9/-]+$")
            try self.validate(self.ocspLambdaArn, name: "ocspLambdaArn", parent: name, max: 140)
        }

        private enum CodingKeys: String, CodingKey {
            case enableOCSPCheck = "enableOCSPCheck"
            case ocspAuthorizedResponderArn = "ocspAuthorizedResponderArn"
            case ocspLambdaArn = "ocspLambdaArn"
        }
    }

    public struct ServerCertificateSummary: AWSDecodableShape {
        /// The ARN of the server certificate.
        public let serverCertificateArn: String?
        /// The status of the server certificate.
        public let serverCertificateStatus: ServerCertificateStatus?
        /// Details that explain the status of the server certificate.
        public let serverCertificateStatusDetail: String?

        @inlinable
        public init(serverCertificateArn: String? = nil, serverCertificateStatus: ServerCertificateStatus? = nil, serverCertificateStatusDetail: String? = nil) {
            self.serverCertificateArn = serverCertificateArn
            self.serverCertificateStatus = serverCertificateStatus
            self.serverCertificateStatusDetail = serverCertificateStatusDetail
        }

        private enum CodingKeys: String, CodingKey {
            case serverCertificateArn = "serverCertificateArn"
            case serverCertificateStatus = "serverCertificateStatus"
            case serverCertificateStatusDetail = "serverCertificateStatusDetail"
        }
    }

    public struct SetDefaultAuthorizerRequest: AWSEncodableShape {
        /// The authorizer name.
        public let authorizerName: String

        @inlinable
        public init(authorizerName: String) {
            self.authorizerName = authorizerName
        }

        public func validate(name: String) throws {
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, max: 128)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, min: 1)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, pattern: "^[\\w=,@-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerName = "authorizerName"
        }
    }

    public struct SetDefaultAuthorizerResponse: AWSDecodableShape {
        /// The authorizer ARN.
        public let authorizerArn: String?
        /// The authorizer name.
        public let authorizerName: String?

        @inlinable
        public init(authorizerArn: String? = nil, authorizerName: String? = nil) {
            self.authorizerArn = authorizerArn
            self.authorizerName = authorizerName
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerArn = "authorizerArn"
            case authorizerName = "authorizerName"
        }
    }

    public struct SetDefaultPolicyVersionRequest: AWSEncodableShape {
        /// The policy name.
        public let policyName: String
        /// The policy version ID.
        public let policyVersionId: String

        @inlinable
        public init(policyName: String, policyVersionId: String) {
            self.policyName = policyName
            self.policyVersionId = policyVersionId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.policyName, key: "policyName")
            request.encodePath(self.policyVersionId, key: "policyVersionId")
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[\\w+=,.@-]+$")
            try self.validate(self.policyVersionId, name: "policyVersionId", parent: name, pattern: "^[0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct SetLoggingOptionsRequest: AWSEncodableShape {
        /// The logging options payload.
        public let loggingOptionsPayload: LoggingOptionsPayload

        @inlinable
        public init(loggingOptionsPayload: LoggingOptionsPayload) {
            self.loggingOptionsPayload = loggingOptionsPayload
        }

        public func encode(to encoder: Encoder) throws {
            var container = encoder.singleValueContainer()
            try container.encode(self.loggingOptionsPayload)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct SetV2LoggingLevelRequest: AWSEncodableShape {
        /// The log level.
        public let logLevel: LogLevel
        /// The log target.
        public let logTarget: LogTarget

        @inlinable
        public init(logLevel: LogLevel, logTarget: LogTarget) {
            self.logLevel = logLevel
            self.logTarget = logTarget
        }

        private enum CodingKeys: String, CodingKey {
            case logLevel = "logLevel"
            case logTarget = "logTarget"
        }
    }

    public struct SetV2LoggingOptionsRequest: AWSEncodableShape {
        /// The default logging level.
        public let defaultLogLevel: LogLevel?
        /// If true all logs are disabled. The default is false.
        public let disableAllLogs: Bool?
        /// The ARN of the role that allows IoT to write to Cloudwatch logs.
        public let roleArn: String?

        @inlinable
        public init(defaultLogLevel: LogLevel? = nil, disableAllLogs: Bool? = nil, roleArn: String? = nil) {
            self.defaultLogLevel = defaultLogLevel
            self.disableAllLogs = disableAllLogs
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case defaultLogLevel = "defaultLogLevel"
            case disableAllLogs = "disableAllLogs"
            case roleArn = "roleArn"
        }
    }

    public struct SigV4Authorization: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the signing role.
        public let roleArn: String
        /// The service name to use while signing with Sig V4.
        public let serviceName: String
        /// The signing region.
        public let signingRegion: String

        @inlinable
        public init(roleArn: String, serviceName: String, signingRegion: String) {
            self.roleArn = roleArn
            self.serviceName = serviceName
            self.signingRegion = signingRegion
        }

        private enum CodingKeys: String, CodingKey {
            case roleArn = "roleArn"
            case serviceName = "serviceName"
            case signingRegion = "signingRegion"
        }
    }

    public struct SigningProfileParameter: AWSEncodableShape & AWSDecodableShape {
        /// Certificate ARN.
        public let certificateArn: String?
        /// The location of the code-signing certificate on your device.
        public let certificatePathOnDevice: String?
        /// The hardware platform of your device.
        public let platform: String?

        @inlinable
        public init(certificateArn: String? = nil, certificatePathOnDevice: String? = nil, platform: String? = nil) {
            self.certificateArn = certificateArn
            self.certificatePathOnDevice = certificatePathOnDevice
            self.platform = platform
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn = "certificateArn"
            case certificatePathOnDevice = "certificatePathOnDevice"
            case platform = "platform"
        }
    }

    public struct SnsAction: AWSEncodableShape & AWSDecodableShape {
        /// (Optional) The message format of the message to publish. Accepted values are "JSON" and "RAW". The default value of the attribute is "RAW". SNS uses this setting to determine if the payload should be parsed and relevant platform-specific bits of the payload should be extracted. To read more about SNS message formats, see https://docs.aws.amazon.com/sns/latest/dg/json-formats.html refer to their official documentation.
        public let messageFormat: MessageFormat?
        /// The ARN of the IAM role that grants access.
        public let roleArn: String
        /// The ARN of the SNS topic.
        public let targetArn: String

        @inlinable
        public init(messageFormat: MessageFormat? = nil, roleArn: String, targetArn: String) {
            self.messageFormat = messageFormat
            self.roleArn = roleArn
            self.targetArn = targetArn
        }

        private enum CodingKeys: String, CodingKey {
            case messageFormat = "messageFormat"
            case roleArn = "roleArn"
            case targetArn = "targetArn"
        }
    }

    public struct SqsAction: AWSEncodableShape & AWSDecodableShape {
        /// The URL of the Amazon SQS queue.
        public let queueUrl: String
        /// The ARN of the IAM role that grants access.
        public let roleArn: String
        /// Specifies whether to use Base64 encoding.
        public let useBase64: Bool?

        @inlinable
        public init(queueUrl: String, roleArn: String, useBase64: Bool? = nil) {
            self.queueUrl = queueUrl
            self.roleArn = roleArn
            self.useBase64 = useBase64
        }

        private enum CodingKeys: String, CodingKey {
            case queueUrl = "queueUrl"
            case roleArn = "roleArn"
            case useBase64 = "useBase64"
        }
    }

    public struct StartAuditMitigationActionsTaskRequest: AWSEncodableShape {
        /// For an audit check, specifies which mitigation actions to apply. Those actions must be defined in your Amazon Web Services accounts.
        public let auditCheckToActionsMapping: [String: [String]]
        /// Each audit mitigation task must have a unique client request token. If you try to start a new task with the same token as a task that already exists, an exception occurs. If you omit this value, a unique client request token is generated automatically.
        public let clientRequestToken: String
        /// Specifies the audit findings to which the mitigation actions are applied. You can apply them to a type of audit check, to all findings from an audit, or to a specific set of findings.
        public let target: AuditMitigationActionsTaskTarget
        /// A unique identifier for the task. You can use this identifier to check the status of the task or to cancel it.
        public let taskId: String

        @inlinable
        public init(auditCheckToActionsMapping: [String: [String]], clientRequestToken: String = StartAuditMitigationActionsTaskRequest.idempotencyToken(), target: AuditMitigationActionsTaskTarget, taskId: String) {
            self.auditCheckToActionsMapping = auditCheckToActionsMapping
            self.clientRequestToken = clientRequestToken
            self.target = target
            self.taskId = taskId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.auditCheckToActionsMapping, forKey: .auditCheckToActionsMapping)
            try container.encode(self.clientRequestToken, forKey: .clientRequestToken)
            try container.encode(self.target, forKey: .target)
            request.encodePath(self.taskId, key: "taskId")
        }

        public func validate(name: String) throws {
            try self.auditCheckToActionsMapping.forEach {
                try validate($0.value, name: "auditCheckToActionsMapping[\"\($0.key)\"]", parent: name, max: 5)
                try validate($0.value, name: "auditCheckToActionsMapping[\"\($0.key)\"]", parent: name, min: 1)
            }
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-_]+$")
            try self.target.validate(name: "\(name).target")
            try self.validate(self.taskId, name: "taskId", parent: name, max: 128)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case auditCheckToActionsMapping = "auditCheckToActionsMapping"
            case clientRequestToken = "clientRequestToken"
            case target = "target"
        }
    }

    public struct StartAuditMitigationActionsTaskResponse: AWSDecodableShape {
        /// The unique identifier for the audit mitigation task. This matches the taskId that you specified in the request.
        public let taskId: String?

        @inlinable
        public init(taskId: String? = nil) {
            self.taskId = taskId
        }

        private enum CodingKeys: String, CodingKey {
            case taskId = "taskId"
        }
    }

    public struct StartDetectMitigationActionsTaskRequest: AWSEncodableShape {
        ///  The actions to be performed when a device has unexpected behavior.
        public let actions: [String]
        ///  Each mitigation action task must have a unique client request token. If you try to create a new task with the same token as a task that already exists, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.
        public let clientRequestToken: String
        ///  Specifies to list only active violations.
        public let includeOnlyActiveViolations: Bool?
        ///  Specifies to include suppressed alerts.
        public let includeSuppressedAlerts: Bool?
        ///  Specifies the ML Detect findings to which the mitigation actions are applied.
        public let target: DetectMitigationActionsTaskTarget
        ///  The unique identifier of the task.
        public let taskId: String
        ///  Specifies the time period of which violation events occurred between.
        public let violationEventOccurrenceRange: ViolationEventOccurrenceRange?

        @inlinable
        public init(actions: [String], clientRequestToken: String = StartDetectMitigationActionsTaskRequest.idempotencyToken(), includeOnlyActiveViolations: Bool? = nil, includeSuppressedAlerts: Bool? = nil, target: DetectMitigationActionsTaskTarget, taskId: String, violationEventOccurrenceRange: ViolationEventOccurrenceRange? = nil) {
            self.actions = actions
            self.clientRequestToken = clientRequestToken
            self.includeOnlyActiveViolations = includeOnlyActiveViolations
            self.includeSuppressedAlerts = includeSuppressedAlerts
            self.target = target
            self.taskId = taskId
            self.violationEventOccurrenceRange = violationEventOccurrenceRange
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.actions, forKey: .actions)
            try container.encode(self.clientRequestToken, forKey: .clientRequestToken)
            try container.encodeIfPresent(self.includeOnlyActiveViolations, forKey: .includeOnlyActiveViolations)
            try container.encodeIfPresent(self.includeSuppressedAlerts, forKey: .includeSuppressedAlerts)
            try container.encode(self.target, forKey: .target)
            request.encodePath(self.taskId, key: "taskId")
            try container.encodeIfPresent(self.violationEventOccurrenceRange, forKey: .violationEventOccurrenceRange)
        }

        public func validate(name: String) throws {
            try self.actions.forEach {
                try validate($0, name: "actions[]", parent: name, max: 128)
                try validate($0, name: "actions[]", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            }
            try self.validate(self.actions, name: "actions", parent: name, max: 5)
            try self.validate(self.actions, name: "actions", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-_]+$")
            try self.target.validate(name: "\(name).target")
            try self.validate(self.taskId, name: "taskId", parent: name, max: 128)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case actions = "actions"
            case clientRequestToken = "clientRequestToken"
            case includeOnlyActiveViolations = "includeOnlyActiveViolations"
            case includeSuppressedAlerts = "includeSuppressedAlerts"
            case target = "target"
            case violationEventOccurrenceRange = "violationEventOccurrenceRange"
        }
    }

    public struct StartDetectMitigationActionsTaskResponse: AWSDecodableShape {
        ///  The unique identifier of the task.
        public let taskId: String?

        @inlinable
        public init(taskId: String? = nil) {
            self.taskId = taskId
        }

        private enum CodingKeys: String, CodingKey {
            case taskId = "taskId"
        }
    }

    public struct StartOnDemandAuditTaskRequest: AWSEncodableShape {
        /// Which checks are performed during the audit. The checks you specify must be enabled  for your account or an exception occurs. Use DescribeAccountAuditConfiguration  to see the list of all checks, including those that are enabled or  UpdateAccountAuditConfiguration to select which checks are enabled.
        public let targetCheckNames: [String]

        @inlinable
        public init(targetCheckNames: [String]) {
            self.targetCheckNames = targetCheckNames
        }

        private enum CodingKeys: String, CodingKey {
            case targetCheckNames = "targetCheckNames"
        }
    }

    public struct StartOnDemandAuditTaskResponse: AWSDecodableShape {
        /// The ID of the on-demand audit you started.
        public let taskId: String?

        @inlinable
        public init(taskId: String? = nil) {
            self.taskId = taskId
        }

        private enum CodingKeys: String, CodingKey {
            case taskId = "taskId"
        }
    }

    public struct StartSigningJobParameter: AWSEncodableShape & AWSDecodableShape {
        /// The location to write the code-signed file.
        public let destination: Destination?
        /// The code-signing profile name.
        public let signingProfileName: String?
        /// Describes the code-signing profile.
        public let signingProfileParameter: SigningProfileParameter?

        @inlinable
        public init(destination: Destination? = nil, signingProfileName: String? = nil, signingProfileParameter: SigningProfileParameter? = nil) {
            self.destination = destination
            self.signingProfileName = signingProfileName
            self.signingProfileParameter = signingProfileParameter
        }

        public func validate(name: String) throws {
            try self.destination?.validate(name: "\(name).destination")
        }

        private enum CodingKeys: String, CodingKey {
            case destination = "destination"
            case signingProfileName = "signingProfileName"
            case signingProfileParameter = "signingProfileParameter"
        }
    }

    public struct StartThingRegistrationTaskRequest: AWSEncodableShape {
        /// The S3 bucket that contains the input file.
        public let inputFileBucket: String
        /// The name of input file within the S3 bucket. This file contains a newline delimited
        /// 			JSON file. Each line contains the parameter values to provision one device
        /// 			(thing).
        public let inputFileKey: String
        /// The IAM role ARN that grants permission the input file.
        public let roleArn: String
        /// The provisioning template.
        public let templateBody: String

        @inlinable
        public init(inputFileBucket: String, inputFileKey: String, roleArn: String, templateBody: String) {
            self.inputFileBucket = inputFileBucket
            self.inputFileKey = inputFileKey
            self.roleArn = roleArn
            self.templateBody = templateBody
        }

        public func validate(name: String) throws {
            try self.validate(self.inputFileBucket, name: "inputFileBucket", parent: name, max: 256)
            try self.validate(self.inputFileBucket, name: "inputFileBucket", parent: name, min: 3)
            try self.validate(self.inputFileBucket, name: "inputFileBucket", parent: name, pattern: "^[a-zA-Z0-9._-]+$")
            try self.validate(self.inputFileKey, name: "inputFileKey", parent: name, max: 1024)
            try self.validate(self.inputFileKey, name: "inputFileKey", parent: name, min: 1)
            try self.validate(self.inputFileKey, name: "inputFileKey", parent: name, pattern: "^[a-zA-Z0-9!_.*'()-\\/]+$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.templateBody, name: "templateBody", parent: name, max: 10240)
            try self.validate(self.templateBody, name: "templateBody", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case inputFileBucket = "inputFileBucket"
            case inputFileKey = "inputFileKey"
            case roleArn = "roleArn"
            case templateBody = "templateBody"
        }
    }

    public struct StartThingRegistrationTaskResponse: AWSDecodableShape {
        /// The bulk thing provisioning task ID.
        public let taskId: String?

        @inlinable
        public init(taskId: String? = nil) {
            self.taskId = taskId
        }

        private enum CodingKeys: String, CodingKey {
            case taskId = "taskId"
        }
    }

    public struct StatisticalThreshold: AWSEncodableShape & AWSDecodableShape {
        /// The percentile that resolves to a threshold value by which compliance with a behavior is determined. Metrics are collected over the specified period (durationSeconds) from all reporting devices in your account and statistical ranks are calculated. Then, the measurements from a device are collected over the same period. If the accumulated measurements from the device fall above or below (comparisonOperator) the value associated with the percentile specified, then the device is considered to be in compliance with the behavior, otherwise a violation occurs.
        public let statistic: String?

        @inlinable
        public init(statistic: String? = nil) {
            self.statistic = statistic
        }

        public func validate(name: String) throws {
            try self.validate(self.statistic, name: "statistic", parent: name, pattern: "^(p0|p0\\.1|p0\\.01|p1|p10|p50|p90|p99|p99\\.9|p99\\.99|p100)$")
        }

        private enum CodingKeys: String, CodingKey {
            case statistic = "statistic"
        }
    }

    public struct Statistics: AWSDecodableShape {
        /// The average of the aggregated field values.
        public let average: Double?
        /// The count of things that match the query string criteria and contain a valid aggregation field value.
        public let count: Int?
        /// The maximum aggregated field value.
        public let maximum: Double?
        /// The minimum aggregated field value.
        public let minimum: Double?
        /// The standard deviation of the aggregated field values.
        public let stdDeviation: Double?
        /// The sum of the aggregated field values.
        public let sum: Double?
        /// The sum of the squares of the aggregated field values.
        public let sumOfSquares: Double?
        /// The variance of the aggregated field values.
        public let variance: Double?

        @inlinable
        public init(average: Double? = nil, count: Int? = nil, maximum: Double? = nil, minimum: Double? = nil, stdDeviation: Double? = nil, sum: Double? = nil, sumOfSquares: Double? = nil, variance: Double? = nil) {
            self.average = average
            self.count = count
            self.maximum = maximum
            self.minimum = minimum
            self.stdDeviation = stdDeviation
            self.sum = sum
            self.sumOfSquares = sumOfSquares
            self.variance = variance
        }

        private enum CodingKeys: String, CodingKey {
            case average = "average"
            case count = "count"
            case maximum = "maximum"
            case minimum = "minimum"
            case stdDeviation = "stdDeviation"
            case sum = "sum"
            case sumOfSquares = "sumOfSquares"
            case variance = "variance"
        }
    }

    public struct StatusReason: AWSDecodableShape {
        /// A code that provides additional context for the command execution status.
        public let reasonCode: String
        /// A literal string for devices to optionally provide additional information about the reason code for a command execution status.
        public let reasonDescription: String?

        @inlinable
        public init(reasonCode: String, reasonDescription: String? = nil) {
            self.reasonCode = reasonCode
            self.reasonDescription = reasonDescription
        }

        private enum CodingKeys: String, CodingKey {
            case reasonCode = "reasonCode"
            case reasonDescription = "reasonDescription"
        }
    }

    public struct StepFunctionsAction: AWSEncodableShape & AWSDecodableShape {
        /// (Optional) A name will be given to the state machine execution consisting of this prefix followed by a UUID. Step Functions automatically creates a unique name for each state machine execution if one is not provided.
        public let executionNamePrefix: String?
        /// The ARN of the role that grants IoT permission to start execution of a state machine ("Action":"states:StartExecution").
        public let roleArn: String
        /// The name of the Step Functions state machine whose execution will be started.
        public let stateMachineName: String

        @inlinable
        public init(executionNamePrefix: String? = nil, roleArn: String, stateMachineName: String) {
            self.executionNamePrefix = executionNamePrefix
            self.roleArn = roleArn
            self.stateMachineName = stateMachineName
        }

        private enum CodingKeys: String, CodingKey {
            case executionNamePrefix = "executionNamePrefix"
            case roleArn = "roleArn"
            case stateMachineName = "stateMachineName"
        }
    }

    public struct StopThingRegistrationTaskRequest: AWSEncodableShape {
        /// The bulk thing provisioning task ID.
        public let taskId: String

        @inlinable
        public init(taskId: String) {
            self.taskId = taskId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.taskId, key: "taskId")
        }

        public func validate(name: String) throws {
            try self.validate(self.taskId, name: "taskId", parent: name, max: 40)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct StopThingRegistrationTaskResponse: AWSDecodableShape {
        public init() {}
    }

    public struct Stream: AWSEncodableShape & AWSDecodableShape {
        /// The ID of a file associated with a stream.
        public let fileId: Int?
        /// The stream ID.
        public let streamId: String?

        @inlinable
        public init(fileId: Int? = nil, streamId: String? = nil) {
            self.fileId = fileId
            self.streamId = streamId
        }

        public func validate(name: String) throws {
            try self.validate(self.fileId, name: "fileId", parent: name, max: 255)
            try self.validate(self.fileId, name: "fileId", parent: name, min: 0)
            try self.validate(self.streamId, name: "streamId", parent: name, max: 128)
            try self.validate(self.streamId, name: "streamId", parent: name, min: 1)
            try self.validate(self.streamId, name: "streamId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case fileId = "fileId"
            case streamId = "streamId"
        }
    }

    public struct StreamFile: AWSEncodableShape & AWSDecodableShape {
        /// The file ID.
        public let fileId: Int?
        /// The location of the file in S3.
        public let s3Location: S3Location?

        @inlinable
        public init(fileId: Int? = nil, s3Location: S3Location? = nil) {
            self.fileId = fileId
            self.s3Location = s3Location
        }

        public func validate(name: String) throws {
            try self.validate(self.fileId, name: "fileId", parent: name, max: 255)
            try self.validate(self.fileId, name: "fileId", parent: name, min: 0)
            try self.s3Location?.validate(name: "\(name).s3Location")
        }

        private enum CodingKeys: String, CodingKey {
            case fileId = "fileId"
            case s3Location = "s3Location"
        }
    }

    public struct StreamInfo: AWSDecodableShape {
        /// The date when the stream was created.
        public let createdAt: Date?
        /// The description of the stream.
        public let description: String?
        /// The files to stream.
        public let files: [StreamFile]?
        /// The date when the stream was last updated.
        public let lastUpdatedAt: Date?
        /// An IAM role IoT assumes to access your S3 files.
        public let roleArn: String?
        /// The stream ARN.
        public let streamArn: String?
        /// The stream ID.
        public let streamId: String?
        /// The stream version.
        public let streamVersion: Int?

        @inlinable
        public init(createdAt: Date? = nil, description: String? = nil, files: [StreamFile]? = nil, lastUpdatedAt: Date? = nil, roleArn: String? = nil, streamArn: String? = nil, streamId: String? = nil, streamVersion: Int? = nil) {
            self.createdAt = createdAt
            self.description = description
            self.files = files
            self.lastUpdatedAt = lastUpdatedAt
            self.roleArn = roleArn
            self.streamArn = streamArn
            self.streamId = streamId
            self.streamVersion = streamVersion
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "createdAt"
            case description = "description"
            case files = "files"
            case lastUpdatedAt = "lastUpdatedAt"
            case roleArn = "roleArn"
            case streamArn = "streamArn"
            case streamId = "streamId"
            case streamVersion = "streamVersion"
        }
    }

    public struct StreamSummary: AWSDecodableShape {
        /// A description of the stream.
        public let description: String?
        /// The stream ARN.
        public let streamArn: String?
        /// The stream ID.
        public let streamId: String?
        /// The stream version.
        public let streamVersion: Int?

        @inlinable
        public init(description: String? = nil, streamArn: String? = nil, streamId: String? = nil, streamVersion: Int? = nil) {
            self.description = description
            self.streamArn = streamArn
            self.streamId = streamId
            self.streamVersion = streamVersion
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case streamArn = "streamArn"
            case streamId = "streamId"
            case streamVersion = "streamVersion"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The tag's key.
        public let key: String
        /// The tag's value.
        public let value: String?

        @inlinable
        public init(key: String, value: String? = nil) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.validate(self.value, name: "value", parent: name, max: 256)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The ARN of the resource.
        public let resourceArn: String
        /// The new or modified tags for the resource.
        public let tags: [Tag]

        @inlinable
        public init(resourceArn: String, tags: [Tag]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "resourceArn"
            case tags = "tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TaskStatistics: AWSDecodableShape {
        /// The number of checks that did not run because the audit was canceled.
        public let canceledChecks: Int?
        /// The number of checks that found compliant resources.
        public let compliantChecks: Int?
        /// The number of checks.
        public let failedChecks: Int?
        /// The number of checks in progress.
        public let inProgressChecks: Int?
        /// The number of checks that found noncompliant resources.
        public let nonCompliantChecks: Int?
        /// The number of checks in this audit.
        public let totalChecks: Int?
        /// The number of checks waiting for data collection.
        public let waitingForDataCollectionChecks: Int?

        @inlinable
        public init(canceledChecks: Int? = nil, compliantChecks: Int? = nil, failedChecks: Int? = nil, inProgressChecks: Int? = nil, nonCompliantChecks: Int? = nil, totalChecks: Int? = nil, waitingForDataCollectionChecks: Int? = nil) {
            self.canceledChecks = canceledChecks
            self.compliantChecks = compliantChecks
            self.failedChecks = failedChecks
            self.inProgressChecks = inProgressChecks
            self.nonCompliantChecks = nonCompliantChecks
            self.totalChecks = totalChecks
            self.waitingForDataCollectionChecks = waitingForDataCollectionChecks
        }

        private enum CodingKeys: String, CodingKey {
            case canceledChecks = "canceledChecks"
            case compliantChecks = "compliantChecks"
            case failedChecks = "failedChecks"
            case inProgressChecks = "inProgressChecks"
            case nonCompliantChecks = "nonCompliantChecks"
            case totalChecks = "totalChecks"
            case waitingForDataCollectionChecks = "waitingForDataCollectionChecks"
        }
    }

    public struct TaskStatisticsForAuditCheck: AWSDecodableShape {
        /// The number of findings to which the mitigation action task was canceled when applied.
        public let canceledFindingsCount: Int64?
        /// The number of findings for which at least one of the actions failed when applied.
        public let failedFindingsCount: Int64?
        /// The number of findings skipped because of filter conditions provided in the parameters to the command.
        public let skippedFindingsCount: Int64?
        /// The number of findings for which all mitigation actions succeeded when applied.
        public let succeededFindingsCount: Int64?
        /// The total number of findings to which a task is being applied.
        public let totalFindingsCount: Int64?

        @inlinable
        public init(canceledFindingsCount: Int64? = nil, failedFindingsCount: Int64? = nil, skippedFindingsCount: Int64? = nil, succeededFindingsCount: Int64? = nil, totalFindingsCount: Int64? = nil) {
            self.canceledFindingsCount = canceledFindingsCount
            self.failedFindingsCount = failedFindingsCount
            self.skippedFindingsCount = skippedFindingsCount
            self.succeededFindingsCount = succeededFindingsCount
            self.totalFindingsCount = totalFindingsCount
        }

        private enum CodingKeys: String, CodingKey {
            case canceledFindingsCount = "canceledFindingsCount"
            case failedFindingsCount = "failedFindingsCount"
            case skippedFindingsCount = "skippedFindingsCount"
            case succeededFindingsCount = "succeededFindingsCount"
            case totalFindingsCount = "totalFindingsCount"
        }
    }

    public struct TermsAggregation: AWSEncodableShape {
        /// The number of buckets to return in the response. Default to 10.
        public let maxBuckets: Int?

        @inlinable
        public init(maxBuckets: Int? = nil) {
            self.maxBuckets = maxBuckets
        }

        public func validate(name: String) throws {
            try self.validate(self.maxBuckets, name: "maxBuckets", parent: name, max: 10000)
            try self.validate(self.maxBuckets, name: "maxBuckets", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxBuckets = "maxBuckets"
        }
    }

    public struct TestAuthorizationRequest: AWSEncodableShape {
        /// A list of authorization info objects. Simulating authorization will create a response for each authInfo object in the list.
        public let authInfos: [AuthInfo]
        /// The MQTT client ID.
        public let clientId: String?
        /// The Cognito identity pool ID.
        public let cognitoIdentityPoolId: String?
        /// When testing custom authorization, the policies specified here are treated as if they are attached to the principal being authorized.
        public let policyNamesToAdd: [String]?
        /// When testing custom authorization, the policies specified here are treated as if they are not attached to the principal being authorized.
        public let policyNamesToSkip: [String]?
        /// The principal. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).
        public let principal: String?

        @inlinable
        public init(authInfos: [AuthInfo], clientId: String? = nil, cognitoIdentityPoolId: String? = nil, policyNamesToAdd: [String]? = nil, policyNamesToSkip: [String]? = nil, principal: String? = nil) {
            self.authInfos = authInfos
            self.clientId = clientId
            self.cognitoIdentityPoolId = cognitoIdentityPoolId
            self.policyNamesToAdd = policyNamesToAdd
            self.policyNamesToSkip = policyNamesToSkip
            self.principal = principal
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.authInfos, forKey: .authInfos)
            request.encodeQuery(self.clientId, key: "clientId")
            try container.encodeIfPresent(self.cognitoIdentityPoolId, forKey: .cognitoIdentityPoolId)
            try container.encodeIfPresent(self.policyNamesToAdd, forKey: .policyNamesToAdd)
            try container.encodeIfPresent(self.policyNamesToSkip, forKey: .policyNamesToSkip)
            try container.encodeIfPresent(self.principal, forKey: .principal)
        }

        public func validate(name: String) throws {
            try self.authInfos.forEach {
                try $0.validate(name: "\(name).authInfos[]")
            }
            try self.validate(self.authInfos, name: "authInfos", parent: name, max: 10)
            try self.validate(self.authInfos, name: "authInfos", parent: name, min: 1)
            try self.policyNamesToAdd?.forEach {
                try validate($0, name: "policyNamesToAdd[]", parent: name, max: 128)
                try validate($0, name: "policyNamesToAdd[]", parent: name, min: 1)
                try validate($0, name: "policyNamesToAdd[]", parent: name, pattern: "^[\\w+=,.@-]+$")
            }
            try self.policyNamesToSkip?.forEach {
                try validate($0, name: "policyNamesToSkip[]", parent: name, max: 128)
                try validate($0, name: "policyNamesToSkip[]", parent: name, min: 1)
                try validate($0, name: "policyNamesToSkip[]", parent: name, pattern: "^[\\w+=,.@-]+$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case authInfos = "authInfos"
            case cognitoIdentityPoolId = "cognitoIdentityPoolId"
            case policyNamesToAdd = "policyNamesToAdd"
            case policyNamesToSkip = "policyNamesToSkip"
            case principal = "principal"
        }
    }

    public struct TestAuthorizationResponse: AWSDecodableShape {
        /// The authentication results.
        public let authResults: [AuthResult]?

        @inlinable
        public init(authResults: [AuthResult]? = nil) {
            self.authResults = authResults
        }

        private enum CodingKeys: String, CodingKey {
            case authResults = "authResults"
        }
    }

    public struct TestInvokeAuthorizerRequest: AWSEncodableShape {
        /// The custom authorizer name.
        public let authorizerName: String
        /// Specifies a test HTTP authorization request.
        public let httpContext: HttpContext?
        /// Specifies a test MQTT authorization request.
        public let mqttContext: MqttContext?
        /// Specifies a test TLS authorization request.
        public let tlsContext: TlsContext?
        /// The token returned by your custom authentication service.
        public let token: String?
        /// The signature made with the token and your custom authentication service's private key. This value must be Base-64-encoded.
        public let tokenSignature: String?

        @inlinable
        public init(authorizerName: String, httpContext: HttpContext? = nil, mqttContext: MqttContext? = nil, tlsContext: TlsContext? = nil, token: String? = nil, tokenSignature: String? = nil) {
            self.authorizerName = authorizerName
            self.httpContext = httpContext
            self.mqttContext = mqttContext
            self.tlsContext = tlsContext
            self.token = token
            self.tokenSignature = tokenSignature
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.authorizerName, key: "authorizerName")
            try container.encodeIfPresent(self.httpContext, forKey: .httpContext)
            try container.encodeIfPresent(self.mqttContext, forKey: .mqttContext)
            try container.encodeIfPresent(self.tlsContext, forKey: .tlsContext)
            try container.encodeIfPresent(self.token, forKey: .token)
            try container.encodeIfPresent(self.tokenSignature, forKey: .tokenSignature)
        }

        public func validate(name: String) throws {
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, max: 128)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, min: 1)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, pattern: "^[\\w=,@-]+$")
            try self.httpContext?.validate(name: "\(name).httpContext")
            try self.mqttContext?.validate(name: "\(name).mqttContext")
            try self.tlsContext?.validate(name: "\(name).tlsContext")
            try self.validate(self.token, name: "token", parent: name, max: 6144)
            try self.validate(self.token, name: "token", parent: name, min: 1)
            try self.validate(self.token, name: "token", parent: name, pattern: "^[\\s\\S]*$")
            try self.validate(self.tokenSignature, name: "tokenSignature", parent: name, max: 2560)
            try self.validate(self.tokenSignature, name: "tokenSignature", parent: name, min: 1)
            try self.validate(self.tokenSignature, name: "tokenSignature", parent: name, pattern: "^[A-Za-z0-9+/]+={0,2}$")
        }

        private enum CodingKeys: String, CodingKey {
            case httpContext = "httpContext"
            case mqttContext = "mqttContext"
            case tlsContext = "tlsContext"
            case token = "token"
            case tokenSignature = "tokenSignature"
        }
    }

    public struct TestInvokeAuthorizerResponse: AWSDecodableShape {
        /// The number of seconds after which the connection is terminated.
        public let disconnectAfterInSeconds: Int?
        /// True if the token is authenticated, otherwise false.
        public let isAuthenticated: Bool?
        /// IAM policy documents.
        public let policyDocuments: [String]?
        /// The principal ID.
        public let principalId: String?
        /// The number of seconds after which the temporary credentials are refreshed.
        public let refreshAfterInSeconds: Int?

        @inlinable
        public init(disconnectAfterInSeconds: Int? = nil, isAuthenticated: Bool? = nil, policyDocuments: [String]? = nil, principalId: String? = nil, refreshAfterInSeconds: Int? = nil) {
            self.disconnectAfterInSeconds = disconnectAfterInSeconds
            self.isAuthenticated = isAuthenticated
            self.policyDocuments = policyDocuments
            self.principalId = principalId
            self.refreshAfterInSeconds = refreshAfterInSeconds
        }

        private enum CodingKeys: String, CodingKey {
            case disconnectAfterInSeconds = "disconnectAfterInSeconds"
            case isAuthenticated = "isAuthenticated"
            case policyDocuments = "policyDocuments"
            case principalId = "principalId"
            case refreshAfterInSeconds = "refreshAfterInSeconds"
        }
    }

    public struct ThingAttribute: AWSDecodableShape {
        /// A list of thing attributes which are name-value pairs.
        public let attributes: [String: String]?
        /// The thing ARN.
        public let thingArn: String?
        /// The name of the thing.
        public let thingName: String?
        /// The name of the thing type, if the thing has been associated with a type.
        public let thingTypeName: String?
        /// The version of the thing record in the registry.
        public let version: Int64?

        @inlinable
        public init(attributes: [String: String]? = nil, thingArn: String? = nil, thingName: String? = nil, thingTypeName: String? = nil, version: Int64? = nil) {
            self.attributes = attributes
            self.thingArn = thingArn
            self.thingName = thingName
            self.thingTypeName = thingTypeName
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "attributes"
            case thingArn = "thingArn"
            case thingName = "thingName"
            case thingTypeName = "thingTypeName"
            case version = "version"
        }
    }

    public struct ThingConnectivity: AWSDecodableShape {
        /// True if the thing is connected to the Amazon Web Services IoT Core service; false if it is not connected.
        public let connected: Bool?
        /// The reason why the client is disconnected. If the thing has been disconnected for approximately an hour, the disconnectReason value might be missing.
        public let disconnectReason: String?
        /// The epoch time (in milliseconds) when the thing last connected or disconnected. If the thing has been disconnected for approximately an hour, the time value might be missing.
        public let timestamp: Int64?

        @inlinable
        public init(connected: Bool? = nil, disconnectReason: String? = nil, timestamp: Int64? = nil) {
            self.connected = connected
            self.disconnectReason = disconnectReason
            self.timestamp = timestamp
        }

        private enum CodingKeys: String, CodingKey {
            case connected = "connected"
            case disconnectReason = "disconnectReason"
            case timestamp = "timestamp"
        }
    }

    public struct ThingDocument: AWSDecodableShape {
        /// The attributes.
        public let attributes: [String: String]?
        /// Indicates whether the thing is connected to the Amazon Web Services IoT Core service.
        public let connectivity: ThingConnectivity?
        /// Contains Device Defender data. For more information about Device Defender, see Device Defender.
        public let deviceDefender: String?
        /// The unnamed shadow and named shadow. For more information about shadows, see IoT Device Shadow service.
        public let shadow: String?
        /// Thing group and billing group names.
        public let thingGroupNames: [String]?
        /// The thing ID.
        public let thingId: String?
        /// The thing name.
        public let thingName: String?
        /// The thing type name.
        public let thingTypeName: String?

        @inlinable
        public init(attributes: [String: String]? = nil, connectivity: ThingConnectivity? = nil, deviceDefender: String? = nil, shadow: String? = nil, thingGroupNames: [String]? = nil, thingId: String? = nil, thingName: String? = nil, thingTypeName: String? = nil) {
            self.attributes = attributes
            self.connectivity = connectivity
            self.deviceDefender = deviceDefender
            self.shadow = shadow
            self.thingGroupNames = thingGroupNames
            self.thingId = thingId
            self.thingName = thingName
            self.thingTypeName = thingTypeName
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "attributes"
            case connectivity = "connectivity"
            case deviceDefender = "deviceDefender"
            case shadow = "shadow"
            case thingGroupNames = "thingGroupNames"
            case thingId = "thingId"
            case thingName = "thingName"
            case thingTypeName = "thingTypeName"
        }
    }

    public struct ThingGroupDocument: AWSDecodableShape {
        /// The thing group attributes.
        public let attributes: [String: String]?
        /// Parent group names.
        public let parentGroupNames: [String]?
        /// The thing group description.
        public let thingGroupDescription: String?
        /// The thing group ID.
        public let thingGroupId: String?
        /// The thing group name.
        public let thingGroupName: String?

        @inlinable
        public init(attributes: [String: String]? = nil, parentGroupNames: [String]? = nil, thingGroupDescription: String? = nil, thingGroupId: String? = nil, thingGroupName: String? = nil) {
            self.attributes = attributes
            self.parentGroupNames = parentGroupNames
            self.thingGroupDescription = thingGroupDescription
            self.thingGroupId = thingGroupId
            self.thingGroupName = thingGroupName
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "attributes"
            case parentGroupNames = "parentGroupNames"
            case thingGroupDescription = "thingGroupDescription"
            case thingGroupId = "thingGroupId"
            case thingGroupName = "thingGroupName"
        }
    }

    public struct ThingGroupIndexingConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A list of thing group fields to index. This list cannot contain any managed fields. Use the GetIndexingConfiguration API to get a list of managed fields. Contains custom field names and their data type.
        public let customFields: [Field]?
        /// Contains fields that are indexed and whose types are already known by the Fleet Indexing service. This is an optional field. For more information, see Managed fields in the Amazon Web Services IoT Core Developer Guide.  You can't modify managed fields by updating fleet indexing configuration.
        public let managedFields: [Field]?
        /// Thing group indexing mode.
        public let thingGroupIndexingMode: ThingGroupIndexingMode

        @inlinable
        public init(customFields: [Field]? = nil, managedFields: [Field]? = nil, thingGroupIndexingMode: ThingGroupIndexingMode) {
            self.customFields = customFields
            self.managedFields = managedFields
            self.thingGroupIndexingMode = thingGroupIndexingMode
        }

        private enum CodingKeys: String, CodingKey {
            case customFields = "customFields"
            case managedFields = "managedFields"
            case thingGroupIndexingMode = "thingGroupIndexingMode"
        }
    }

    public struct ThingGroupMetadata: AWSDecodableShape {
        /// The UNIX timestamp of when the thing group was created.
        public let creationDate: Date?
        /// The parent thing group name.
        public let parentGroupName: String?
        /// The root parent thing group.
        public let rootToParentThingGroups: [GroupNameAndArn]?

        @inlinable
        public init(creationDate: Date? = nil, parentGroupName: String? = nil, rootToParentThingGroups: [GroupNameAndArn]? = nil) {
            self.creationDate = creationDate
            self.parentGroupName = parentGroupName
            self.rootToParentThingGroups = rootToParentThingGroups
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
            case parentGroupName = "parentGroupName"
            case rootToParentThingGroups = "rootToParentThingGroups"
        }
    }

    public struct ThingGroupProperties: AWSEncodableShape & AWSDecodableShape {
        /// The thing group attributes in JSON format.
        public let attributePayload: AttributePayload?
        /// The thing group description.
        public let thingGroupDescription: String?

        @inlinable
        public init(attributePayload: AttributePayload? = nil, thingGroupDescription: String? = nil) {
            self.attributePayload = attributePayload
            self.thingGroupDescription = thingGroupDescription
        }

        public func validate(name: String) throws {
            try self.attributePayload?.validate(name: "\(name).attributePayload")
            try self.validate(self.thingGroupDescription, name: "thingGroupDescription", parent: name, max: 2028)
            try self.validate(self.thingGroupDescription, name: "thingGroupDescription", parent: name, pattern: "^[\\p{Graph}\\x20]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributePayload = "attributePayload"
            case thingGroupDescription = "thingGroupDescription"
        }
    }

    public struct ThingIndexingConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Contains custom field names and their data type.
        public let customFields: [Field]?
        /// Device Defender indexing mode. Valid values are:   VIOLATIONS – Your thing index contains Device Defender violations. To enable Device Defender indexing, deviceDefenderIndexingMode must not be set to OFF.   OFF - Device Defender indexing is disabled.   For more information about Device Defender violations, see Device Defender Detect.
        public let deviceDefenderIndexingMode: DeviceDefenderIndexingMode?
        /// Provides additional selections for named shadows and geolocation data.  To add named shadows to your fleet indexing configuration, set namedShadowIndexingMode to be ON and specify your shadow names in namedShadowNames filter. To add geolocation data to your fleet indexing configuration:    If you store geolocation data in a class/unnamed shadow, set thingIndexingMode to be REGISTRY_AND_SHADOW and specify your geolocation data in geoLocations filter.    If you store geolocation data in a named shadow, set namedShadowIndexingMode to be ON, add the shadow name in namedShadowNames filter, and specify your geolocation data in geoLocations filter. For more information, see Managing fleet indexing.
        public let filter: IndexingFilter?
        /// Contains fields that are indexed and whose types are already known by the Fleet Indexing service. This is an optional field. For more information, see Managed fields in the Amazon Web Services IoT Core Developer Guide.  You can't modify managed fields by updating fleet indexing configuration.
        public let managedFields: [Field]?
        /// Named shadow indexing mode. Valid values are:   ON – Your thing index contains named shadow. To enable thing named shadow indexing, namedShadowIndexingMode must not be set to OFF.   OFF - Named shadow indexing is disabled.   For more information about Shadows, see IoT Device Shadow service.
        public let namedShadowIndexingMode: NamedShadowIndexingMode?
        /// Thing connectivity indexing mode. Valid values are:    STATUS – Your thing index contains connectivity status. To enable thing connectivity indexing, thingIndexMode must not be set to OFF.   OFF - Thing connectivity status indexing is disabled.
        public let thingConnectivityIndexingMode: ThingConnectivityIndexingMode?
        /// Thing indexing mode. Valid values are:   REGISTRY – Your thing index contains registry data only.   REGISTRY_AND_SHADOW - Your thing index contains registry and shadow data.   OFF - Thing indexing is disabled.
        public let thingIndexingMode: ThingIndexingMode

        @inlinable
        public init(customFields: [Field]? = nil, deviceDefenderIndexingMode: DeviceDefenderIndexingMode? = nil, filter: IndexingFilter? = nil, managedFields: [Field]? = nil, namedShadowIndexingMode: NamedShadowIndexingMode? = nil, thingConnectivityIndexingMode: ThingConnectivityIndexingMode? = nil, thingIndexingMode: ThingIndexingMode) {
            self.customFields = customFields
            self.deviceDefenderIndexingMode = deviceDefenderIndexingMode
            self.filter = filter
            self.managedFields = managedFields
            self.namedShadowIndexingMode = namedShadowIndexingMode
            self.thingConnectivityIndexingMode = thingConnectivityIndexingMode
            self.thingIndexingMode = thingIndexingMode
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
        }

        private enum CodingKeys: String, CodingKey {
            case customFields = "customFields"
            case deviceDefenderIndexingMode = "deviceDefenderIndexingMode"
            case filter = "filter"
            case managedFields = "managedFields"
            case namedShadowIndexingMode = "namedShadowIndexingMode"
            case thingConnectivityIndexingMode = "thingConnectivityIndexingMode"
            case thingIndexingMode = "thingIndexingMode"
        }
    }

    public struct ThingPrincipalObject: AWSDecodableShape {
        /// The principal of the thing principal object.
        public let principal: String
        /// The type of the relation you want to specify when you attach a principal to a thing.
        /// 				The value defaults to NON_EXCLUSIVE_THING.    EXCLUSIVE_THING - Attaches the specified principal to the specified thing, exclusively.
        /// 						The thing will be the only thing that’s attached to the principal.      NON_EXCLUSIVE_THING - Attaches the specified principal to the specified thing.
        /// 						Multiple things can be attached to the principal.
        public let thingPrincipalType: ThingPrincipalType?

        @inlinable
        public init(principal: String, thingPrincipalType: ThingPrincipalType? = nil) {
            self.principal = principal
            self.thingPrincipalType = thingPrincipalType
        }

        private enum CodingKeys: String, CodingKey {
            case principal = "principal"
            case thingPrincipalType = "thingPrincipalType"
        }
    }

    public struct ThingTypeDefinition: AWSDecodableShape {
        /// The thing type ARN.
        public let thingTypeArn: String?
        /// The ThingTypeMetadata contains additional information about the thing type including: creation date and
        /// 			time, a value indicating whether the thing type is deprecated, and a date and time when it was
        /// 			deprecated.
        public let thingTypeMetadata: ThingTypeMetadata?
        /// The name of the thing type.
        public let thingTypeName: String?
        /// The ThingTypeProperties for the thing type.
        public let thingTypeProperties: ThingTypeProperties?

        @inlinable
        public init(thingTypeArn: String? = nil, thingTypeMetadata: ThingTypeMetadata? = nil, thingTypeName: String? = nil, thingTypeProperties: ThingTypeProperties? = nil) {
            self.thingTypeArn = thingTypeArn
            self.thingTypeMetadata = thingTypeMetadata
            self.thingTypeName = thingTypeName
            self.thingTypeProperties = thingTypeProperties
        }

        private enum CodingKeys: String, CodingKey {
            case thingTypeArn = "thingTypeArn"
            case thingTypeMetadata = "thingTypeMetadata"
            case thingTypeName = "thingTypeName"
            case thingTypeProperties = "thingTypeProperties"
        }
    }

    public struct ThingTypeMetadata: AWSDecodableShape {
        /// The date and time when the thing type was created.
        public let creationDate: Date?
        /// Whether the thing type is deprecated. If true, no new things could be
        /// 			associated with this type.
        public let deprecated: Bool?
        /// The date and time when the thing type was deprecated.
        public let deprecationDate: Date?

        @inlinable
        public init(creationDate: Date? = nil, deprecated: Bool? = nil, deprecationDate: Date? = nil) {
            self.creationDate = creationDate
            self.deprecated = deprecated
            self.deprecationDate = deprecationDate
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
            case deprecated = "deprecated"
            case deprecationDate = "deprecationDate"
        }
    }

    public struct ThingTypeProperties: AWSEncodableShape & AWSDecodableShape {
        /// The configuration to add user-defined properties to enrich MQTT 5 messages.
        public let mqtt5Configuration: Mqtt5Configuration?
        /// A list of searchable thing attribute names.
        public let searchableAttributes: [String]?
        /// The description of the thing type.
        public let thingTypeDescription: String?

        @inlinable
        public init(mqtt5Configuration: Mqtt5Configuration? = nil, searchableAttributes: [String]? = nil, thingTypeDescription: String? = nil) {
            self.mqtt5Configuration = mqtt5Configuration
            self.searchableAttributes = searchableAttributes
            self.thingTypeDescription = thingTypeDescription
        }

        public func validate(name: String) throws {
            try self.mqtt5Configuration?.validate(name: "\(name).mqtt5Configuration")
            try self.searchableAttributes?.forEach {
                try validate($0, name: "searchableAttributes[]", parent: name, max: 128)
                try validate($0, name: "searchableAttributes[]", parent: name, pattern: "^[a-zA-Z0-9_.,@/:#-]+$")
            }
            try self.validate(self.thingTypeDescription, name: "thingTypeDescription", parent: name, max: 2028)
            try self.validate(self.thingTypeDescription, name: "thingTypeDescription", parent: name, pattern: "^[\\p{Graph}\\x20]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case mqtt5Configuration = "mqtt5Configuration"
            case searchableAttributes = "searchableAttributes"
            case thingTypeDescription = "thingTypeDescription"
        }
    }

    public struct TimeFilter: AWSEncodableShape {
        /// Filter to display command executions that started or completed only after a particular date and time.
        public let after: String?
        /// Filter to display command executions that started or completed only before a particular date and time.
        public let before: String?

        @inlinable
        public init(after: String? = nil, before: String? = nil) {
            self.after = after
            self.before = before
        }

        public func validate(name: String) throws {
            try self.validate(self.after, name: "after", parent: name, max: 64)
            try self.validate(self.after, name: "after", parent: name, min: 1)
            try self.validate(self.before, name: "before", parent: name, max: 64)
            try self.validate(self.before, name: "before", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case after = "after"
            case before = "before"
        }
    }

    public struct TimeoutConfig: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the amount of time, in minutes, this device has to finish execution of this job. The timeout interval can be anywhere between 1 minute and 7 days (1 to 10080 minutes). The in progress timer can't be updated and will apply to all job executions for the job. Whenever a job execution remains in the IN_PROGRESS status for longer than this interval, the job execution will fail and switch to the terminal TIMED_OUT status.
        public let inProgressTimeoutInMinutes: Int64?

        @inlinable
        public init(inProgressTimeoutInMinutes: Int64? = nil) {
            self.inProgressTimeoutInMinutes = inProgressTimeoutInMinutes
        }

        private enum CodingKeys: String, CodingKey {
            case inProgressTimeoutInMinutes = "inProgressTimeoutInMinutes"
        }
    }

    public struct TimestreamAction: AWSEncodableShape & AWSDecodableShape {
        /// The name of an Amazon Timestream database.
        public let databaseName: String
        /// Metadata attributes of the time series that are written in each measure record.
        public let dimensions: [TimestreamDimension]
        /// The ARN of the role that grants permission to write to the Amazon Timestream database table.
        public let roleArn: String
        /// The name of the database table into which to write the measure records.
        public let tableName: String
        /// Specifies an application-defined value to replace the default value assigned to the Timestream record's timestamp in the time column. You can use this property to specify the value and the precision of the Timestream record's timestamp. You can specify a value from the message payload or a value computed by a substitution template. If omitted, the topic rule action assigns the timestamp, in milliseconds, at the time it processed the rule.
        public let timestamp: TimestreamTimestamp?

        @inlinable
        public init(databaseName: String, dimensions: [TimestreamDimension], roleArn: String, tableName: String, timestamp: TimestreamTimestamp? = nil) {
            self.databaseName = databaseName
            self.dimensions = dimensions
            self.roleArn = roleArn
            self.tableName = tableName
            self.timestamp = timestamp
        }

        public func validate(name: String) throws {
            try self.validate(self.dimensions, name: "dimensions", parent: name, max: 128)
            try self.validate(self.dimensions, name: "dimensions", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case databaseName = "databaseName"
            case dimensions = "dimensions"
            case roleArn = "roleArn"
            case tableName = "tableName"
            case timestamp = "timestamp"
        }
    }

    public struct TimestreamDimension: AWSEncodableShape & AWSDecodableShape {
        /// The metadata dimension name. This is the name of the column in the Amazon Timestream database table record. Dimensions cannot be named: measure_name, measure_value, or time. These  names are reserved. Dimension names cannot start with ts_ or measure_value and they cannot contain the colon (:) character.
        public let name: String
        /// The value to write in this column of the database record.
        public let value: String

        @inlinable
        public init(name: String, value: String) {
            self.name = name
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case name = "name"
            case value = "value"
        }
    }

    public struct TimestreamTimestamp: AWSEncodableShape & AWSDecodableShape {
        /// The precision of the timestamp value that results from the expression described in value. Valid values:  SECONDS | MILLISECONDS | MICROSECONDS | NANOSECONDS. The default is MILLISECONDS.
        public let unit: String
        /// An expression that returns a long epoch time value.
        public let value: String

        @inlinable
        public init(unit: String, value: String) {
            self.unit = unit
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case unit = "unit"
            case value = "value"
        }
    }

    public struct TlsConfig: AWSEncodableShape & AWSDecodableShape {
        /// The security policy for a domain configuration. For more information, see Security policies  in the Amazon Web Services IoT Core developer guide.
        public let securityPolicy: String?

        @inlinable
        public init(securityPolicy: String? = nil) {
            self.securityPolicy = securityPolicy
        }

        public func validate(name: String) throws {
            try self.validate(self.securityPolicy, name: "securityPolicy", parent: name, max: 128)
            try self.validate(self.securityPolicy, name: "securityPolicy", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case securityPolicy = "securityPolicy"
        }
    }

    public struct TlsContext: AWSEncodableShape {
        /// The value of the serverName key in a TLS authorization request.
        public let serverName: String?

        @inlinable
        public init(serverName: String? = nil) {
            self.serverName = serverName
        }

        public func validate(name: String) throws {
            try self.validate(self.serverName, name: "serverName", parent: name, max: 253)
            try self.validate(self.serverName, name: "serverName", parent: name, min: 1)
            try self.validate(self.serverName, name: "serverName", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case serverName = "serverName"
        }
    }

    public struct TopicRule: AWSDecodableShape {
        /// The actions associated with the rule.
        public let actions: [Action]?
        /// The version of the SQL rules engine to use when evaluating the rule.
        public let awsIotSqlVersion: String?
        /// The date and time the rule was created.
        public let createdAt: Date?
        /// The description of the rule.
        public let description: String?
        /// The action to perform when an error occurs.
        public let errorAction: Action?
        /// Specifies whether the rule is disabled.
        public let ruleDisabled: Bool?
        /// The name of the rule.
        public let ruleName: String?
        /// The SQL statement used to query the topic. When using a SQL query with multiple lines, be sure to escape the newline characters.
        public let sql: String?

        @inlinable
        public init(actions: [Action]? = nil, awsIotSqlVersion: String? = nil, createdAt: Date? = nil, description: String? = nil, errorAction: Action? = nil, ruleDisabled: Bool? = nil, ruleName: String? = nil, sql: String? = nil) {
            self.actions = actions
            self.awsIotSqlVersion = awsIotSqlVersion
            self.createdAt = createdAt
            self.description = description
            self.errorAction = errorAction
            self.ruleDisabled = ruleDisabled
            self.ruleName = ruleName
            self.sql = sql
        }

        private enum CodingKeys: String, CodingKey {
            case actions = "actions"
            case awsIotSqlVersion = "awsIotSqlVersion"
            case createdAt = "createdAt"
            case description = "description"
            case errorAction = "errorAction"
            case ruleDisabled = "ruleDisabled"
            case ruleName = "ruleName"
            case sql = "sql"
        }
    }

    public struct TopicRuleDestination: AWSDecodableShape {
        /// The topic rule destination URL.
        public let arn: String?
        /// The date and time when the topic rule destination was created.
        public let createdAt: Date?
        /// Properties of the HTTP URL.
        public let httpUrlProperties: HttpUrlDestinationProperties?
        /// The date and time when the topic rule destination was last updated.
        public let lastUpdatedAt: Date?
        /// The status of the topic rule destination. Valid values are:  IN_PROGRESS  A topic rule destination was created but has not been confirmed. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.  ENABLED  Confirmation was completed, and traffic to this destination is allowed. You can set status to DISABLED by calling UpdateTopicRuleDestination.  DISABLED  Confirmation was completed, and traffic to this destination is not allowed. You can set status to ENABLED by calling UpdateTopicRuleDestination.  ERROR  Confirmation could not be completed, for example if the confirmation timed out. You can call GetTopicRuleDestination for details about the error. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.
        public let status: TopicRuleDestinationStatus?
        /// Additional details or reason why the topic rule destination is in the current status.
        public let statusReason: String?
        /// Properties of the virtual private cloud (VPC) connection.
        public let vpcProperties: VpcDestinationProperties?

        @inlinable
        public init(arn: String? = nil, createdAt: Date? = nil, httpUrlProperties: HttpUrlDestinationProperties? = nil, lastUpdatedAt: Date? = nil, status: TopicRuleDestinationStatus? = nil, statusReason: String? = nil, vpcProperties: VpcDestinationProperties? = nil) {
            self.arn = arn
            self.createdAt = createdAt
            self.httpUrlProperties = httpUrlProperties
            self.lastUpdatedAt = lastUpdatedAt
            self.status = status
            self.statusReason = statusReason
            self.vpcProperties = vpcProperties
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case createdAt = "createdAt"
            case httpUrlProperties = "httpUrlProperties"
            case lastUpdatedAt = "lastUpdatedAt"
            case status = "status"
            case statusReason = "statusReason"
            case vpcProperties = "vpcProperties"
        }
    }

    public struct TopicRuleDestinationConfiguration: AWSEncodableShape {
        /// Configuration of the HTTP URL.
        public let httpUrlConfiguration: HttpUrlDestinationConfiguration?
        /// Configuration of the virtual private cloud (VPC) connection.
        public let vpcConfiguration: VpcDestinationConfiguration?

        @inlinable
        public init(httpUrlConfiguration: HttpUrlDestinationConfiguration? = nil, vpcConfiguration: VpcDestinationConfiguration? = nil) {
            self.httpUrlConfiguration = httpUrlConfiguration
            self.vpcConfiguration = vpcConfiguration
        }

        public func validate(name: String) throws {
            try self.httpUrlConfiguration?.validate(name: "\(name).httpUrlConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case httpUrlConfiguration = "httpUrlConfiguration"
            case vpcConfiguration = "vpcConfiguration"
        }
    }

    public struct TopicRuleDestinationSummary: AWSDecodableShape {
        /// The topic rule destination ARN.
        public let arn: String?
        /// The date and time when the topic rule destination was created.
        public let createdAt: Date?
        /// Information about the HTTP URL.
        public let httpUrlSummary: HttpUrlDestinationSummary?
        /// The date and time when the topic rule destination was last updated.
        public let lastUpdatedAt: Date?
        /// The status of the topic rule destination. Valid values are:  IN_PROGRESS  A topic rule destination was created but has not been confirmed. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.  ENABLED  Confirmation was completed, and traffic to this destination is allowed. You can set status to DISABLED by calling UpdateTopicRuleDestination.  DISABLED  Confirmation was completed, and traffic to this destination is not allowed. You can set status to ENABLED by calling UpdateTopicRuleDestination.  ERROR  Confirmation could not be completed, for example if the confirmation timed out. You can call GetTopicRuleDestination for details about the error. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.
        public let status: TopicRuleDestinationStatus?
        /// The reason the topic rule destination is in the current status.
        public let statusReason: String?
        /// Information about the virtual private cloud (VPC) connection.
        public let vpcDestinationSummary: VpcDestinationSummary?

        @inlinable
        public init(arn: String? = nil, createdAt: Date? = nil, httpUrlSummary: HttpUrlDestinationSummary? = nil, lastUpdatedAt: Date? = nil, status: TopicRuleDestinationStatus? = nil, statusReason: String? = nil, vpcDestinationSummary: VpcDestinationSummary? = nil) {
            self.arn = arn
            self.createdAt = createdAt
            self.httpUrlSummary = httpUrlSummary
            self.lastUpdatedAt = lastUpdatedAt
            self.status = status
            self.statusReason = statusReason
            self.vpcDestinationSummary = vpcDestinationSummary
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case createdAt = "createdAt"
            case httpUrlSummary = "httpUrlSummary"
            case lastUpdatedAt = "lastUpdatedAt"
            case status = "status"
            case statusReason = "statusReason"
            case vpcDestinationSummary = "vpcDestinationSummary"
        }
    }

    public struct TopicRuleListItem: AWSDecodableShape {
        /// The date and time the rule was created.
        public let createdAt: Date?
        /// The rule ARN.
        public let ruleArn: String?
        /// Specifies whether the rule is disabled.
        public let ruleDisabled: Bool?
        /// The name of the rule.
        public let ruleName: String?
        /// The pattern for the topic names that apply.
        public let topicPattern: String?

        @inlinable
        public init(createdAt: Date? = nil, ruleArn: String? = nil, ruleDisabled: Bool? = nil, ruleName: String? = nil, topicPattern: String? = nil) {
            self.createdAt = createdAt
            self.ruleArn = ruleArn
            self.ruleDisabled = ruleDisabled
            self.ruleName = ruleName
            self.topicPattern = topicPattern
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt = "createdAt"
            case ruleArn = "ruleArn"
            case ruleDisabled = "ruleDisabled"
            case ruleName = "ruleName"
            case topicPattern = "topicPattern"
        }
    }

    public struct TopicRulePayload: AWSEncodableShape {
        /// The actions associated with the rule.
        public let actions: [Action]
        /// The version of the SQL rules engine to use when evaluating the rule.
        public let awsIotSqlVersion: String?
        /// The description of the rule.
        public let description: String?
        /// The action to take when an error occurs.
        public let errorAction: Action?
        /// Specifies whether the rule is disabled.
        public let ruleDisabled: Bool?
        /// The SQL statement used to query the topic. For more information, see IoT SQL Reference in the IoT Developer Guide.
        public let sql: String

        @inlinable
        public init(actions: [Action], awsIotSqlVersion: String? = nil, description: String? = nil, errorAction: Action? = nil, ruleDisabled: Bool? = nil, sql: String) {
            self.actions = actions
            self.awsIotSqlVersion = awsIotSqlVersion
            self.description = description
            self.errorAction = errorAction
            self.ruleDisabled = ruleDisabled
            self.sql = sql
        }

        public func validate(name: String) throws {
            try self.actions.forEach {
                try $0.validate(name: "\(name).actions[]")
            }
            try self.validate(self.actions, name: "actions", parent: name, max: 10)
            try self.errorAction?.validate(name: "\(name).errorAction")
        }

        private enum CodingKeys: String, CodingKey {
            case actions = "actions"
            case awsIotSqlVersion = "awsIotSqlVersion"
            case description = "description"
            case errorAction = "errorAction"
            case ruleDisabled = "ruleDisabled"
            case sql = "sql"
        }
    }

    public struct TransferCertificateRequest: AWSEncodableShape {
        /// The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String
        /// The Amazon Web Services account.
        public let targetAwsAccount: String
        /// The transfer message.
        public let transferMessage: String?

        @inlinable
        public init(certificateId: String, targetAwsAccount: String, transferMessage: String? = nil) {
            self.certificateId = certificateId
            self.targetAwsAccount = targetAwsAccount
            self.transferMessage = transferMessage
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.certificateId, key: "certificateId")
            request.encodeQuery(self.targetAwsAccount, key: "targetAwsAccount")
            try container.encodeIfPresent(self.transferMessage, forKey: .transferMessage)
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "^(0x)?[a-fA-F0-9]+$")
            try self.validate(self.targetAwsAccount, name: "targetAwsAccount", parent: name, max: 12)
            try self.validate(self.targetAwsAccount, name: "targetAwsAccount", parent: name, min: 12)
            try self.validate(self.targetAwsAccount, name: "targetAwsAccount", parent: name, pattern: "^[0-9]+$")
            try self.validate(self.transferMessage, name: "transferMessage", parent: name, max: 128)
            try self.validate(self.transferMessage, name: "transferMessage", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case transferMessage = "transferMessage"
        }
    }

    public struct TransferCertificateResponse: AWSDecodableShape {
        /// The ARN of the certificate.
        public let transferredCertificateArn: String?

        @inlinable
        public init(transferredCertificateArn: String? = nil) {
            self.transferredCertificateArn = transferredCertificateArn
        }

        private enum CodingKeys: String, CodingKey {
            case transferredCertificateArn = "transferredCertificateArn"
        }
    }

    public struct TransferData: AWSDecodableShape {
        /// The date the transfer was accepted.
        public let acceptDate: Date?
        /// The date the transfer was rejected.
        public let rejectDate: Date?
        /// The reason why the transfer was rejected.
        public let rejectReason: String?
        /// The date the transfer took place.
        public let transferDate: Date?
        /// The transfer message.
        public let transferMessage: String?

        @inlinable
        public init(acceptDate: Date? = nil, rejectDate: Date? = nil, rejectReason: String? = nil, transferDate: Date? = nil, transferMessage: String? = nil) {
            self.acceptDate = acceptDate
            self.rejectDate = rejectDate
            self.rejectReason = rejectReason
            self.transferDate = transferDate
            self.transferMessage = transferMessage
        }

        private enum CodingKeys: String, CodingKey {
            case acceptDate = "acceptDate"
            case rejectDate = "rejectDate"
            case rejectReason = "rejectReason"
            case transferDate = "transferDate"
            case transferMessage = "transferMessage"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The ARN of the resource.
        public let resourceArn: String
        /// A list of the keys of the tags to be removed from the resource.
        public let tagKeys: [String]

        @inlinable
        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "resourceArn"
            case tagKeys = "tagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateAccountAuditConfigurationRequest: AWSEncodableShape {
        /// Specifies which audit checks are enabled and disabled for this account. Use  DescribeAccountAuditConfiguration to see the list of all checks, including those  that are currently enabled. Some data collection might start immediately when certain checks are enabled.  When a check is disabled, any data collected so far in relation to the check is deleted. You cannot disable a check if it's used by any scheduled audit. You must first delete the check from the scheduled audit or delete the scheduled audit itself. On the first call to UpdateAccountAuditConfiguration, this parameter is required and must specify at least one enabled check.
        public let auditCheckConfigurations: [String: AuditCheckConfiguration]?
        /// Information about the targets to which audit notifications are sent.
        public let auditNotificationTargetConfigurations: [AuditNotificationType: AuditNotificationTarget]?
        /// The Amazon Resource Name (ARN) of the role that grants permission to IoT to access information about your devices, policies, certificates, and other items as required when performing an audit.
        public let roleArn: String?

        @inlinable
        public init(auditCheckConfigurations: [String: AuditCheckConfiguration]? = nil, auditNotificationTargetConfigurations: [AuditNotificationType: AuditNotificationTarget]? = nil, roleArn: String? = nil) {
            self.auditCheckConfigurations = auditCheckConfigurations
            self.auditNotificationTargetConfigurations = auditNotificationTargetConfigurations
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.auditCheckConfigurations?.forEach {
                try $0.value.validate(name: "\(name).auditCheckConfigurations[\"\($0.key)\"]")
            }
            try self.auditNotificationTargetConfigurations?.forEach {
                try $0.value.validate(name: "\(name).auditNotificationTargetConfigurations[\"\($0.key)\"]")
            }
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case auditCheckConfigurations = "auditCheckConfigurations"
            case auditNotificationTargetConfigurations = "auditNotificationTargetConfigurations"
            case roleArn = "roleArn"
        }
    }

    public struct UpdateAccountAuditConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateAuditSuppressionRequest: AWSEncodableShape {
        public let checkName: String
        ///  The description of the audit suppression.
        public let description: String?
        ///  The expiration date (epoch timestamp in seconds) that you want the suppression to adhere to.
        public let expirationDate: Date?
        public let resourceIdentifier: ResourceIdentifier
        ///  Indicates whether a suppression should exist indefinitely or not.
        public let suppressIndefinitely: Bool?

        @inlinable
        public init(checkName: String, description: String? = nil, expirationDate: Date? = nil, resourceIdentifier: ResourceIdentifier, suppressIndefinitely: Bool? = nil) {
            self.checkName = checkName
            self.description = description
            self.expirationDate = expirationDate
            self.resourceIdentifier = resourceIdentifier
            self.suppressIndefinitely = suppressIndefinitely
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\p{Graph}\\x20]*$")
            try self.resourceIdentifier.validate(name: "\(name).resourceIdentifier")
        }

        private enum CodingKeys: String, CodingKey {
            case checkName = "checkName"
            case description = "description"
            case expirationDate = "expirationDate"
            case resourceIdentifier = "resourceIdentifier"
            case suppressIndefinitely = "suppressIndefinitely"
        }
    }

    public struct UpdateAuditSuppressionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateAuthorizerRequest: AWSEncodableShape {
        /// The ARN of the authorizer's Lambda function.
        public let authorizerFunctionArn: String?
        /// The authorizer name.
        public let authorizerName: String
        /// When true, the result from the authorizer’s Lambda function is
        /// 	  cached for the time specified in refreshAfterInSeconds. The cached
        /// 	  result is used while the device reuses the same HTTP connection.
        public let enableCachingForHttp: Bool?
        /// The status of the update authorizer request.
        public let status: AuthorizerStatus?
        /// The key used to extract the token from the HTTP headers.
        public let tokenKeyName: String?
        /// The public keys used to verify the token signature.
        public let tokenSigningPublicKeys: [String: String]?

        @inlinable
        public init(authorizerFunctionArn: String? = nil, authorizerName: String, enableCachingForHttp: Bool? = nil, status: AuthorizerStatus? = nil, tokenKeyName: String? = nil, tokenSigningPublicKeys: [String: String]? = nil) {
            self.authorizerFunctionArn = authorizerFunctionArn
            self.authorizerName = authorizerName
            self.enableCachingForHttp = enableCachingForHttp
            self.status = status
            self.tokenKeyName = tokenKeyName
            self.tokenSigningPublicKeys = tokenSigningPublicKeys
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.authorizerFunctionArn, forKey: .authorizerFunctionArn)
            request.encodePath(self.authorizerName, key: "authorizerName")
            try container.encodeIfPresent(self.enableCachingForHttp, forKey: .enableCachingForHttp)
            try container.encodeIfPresent(self.status, forKey: .status)
            try container.encodeIfPresent(self.tokenKeyName, forKey: .tokenKeyName)
            try container.encodeIfPresent(self.tokenSigningPublicKeys, forKey: .tokenSigningPublicKeys)
        }

        public func validate(name: String) throws {
            try self.validate(self.authorizerFunctionArn, name: "authorizerFunctionArn", parent: name, max: 2048)
            try self.validate(self.authorizerFunctionArn, name: "authorizerFunctionArn", parent: name, pattern: "^[\\s\\S]*$")
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, max: 128)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, min: 1)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, pattern: "^[\\w=,@-]+$")
            try self.validate(self.tokenKeyName, name: "tokenKeyName", parent: name, max: 128)
            try self.validate(self.tokenKeyName, name: "tokenKeyName", parent: name, min: 1)
            try self.validate(self.tokenKeyName, name: "tokenKeyName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.tokenSigningPublicKeys?.forEach {
                try validate($0.key, name: "tokenSigningPublicKeys.key", parent: name, max: 128)
                try validate($0.key, name: "tokenSigningPublicKeys.key", parent: name, min: 1)
                try validate($0.key, name: "tokenSigningPublicKeys.key", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
                try validate($0.value, name: "tokenSigningPublicKeys[\"\($0.key)\"]", parent: name, max: 5120)
                try validate($0.value, name: "tokenSigningPublicKeys[\"\($0.key)\"]", parent: name, pattern: "^[\\s\\S]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerFunctionArn = "authorizerFunctionArn"
            case enableCachingForHttp = "enableCachingForHttp"
            case status = "status"
            case tokenKeyName = "tokenKeyName"
            case tokenSigningPublicKeys = "tokenSigningPublicKeys"
        }
    }

    public struct UpdateAuthorizerResponse: AWSDecodableShape {
        /// The authorizer ARN.
        public let authorizerArn: String?
        /// The authorizer name.
        public let authorizerName: String?

        @inlinable
        public init(authorizerArn: String? = nil, authorizerName: String? = nil) {
            self.authorizerArn = authorizerArn
            self.authorizerName = authorizerName
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerArn = "authorizerArn"
            case authorizerName = "authorizerName"
        }
    }

    public struct UpdateBillingGroupRequest: AWSEncodableShape {
        /// The name of the billing group.
        public let billingGroupName: String
        /// The properties of the billing group.
        public let billingGroupProperties: BillingGroupProperties
        /// The expected version of the billing group. If the version of the billing group does
        /// 			not match the expected version specified in the request, the
        /// 				UpdateBillingGroup request is rejected with a
        /// 				VersionConflictException.
        public let expectedVersion: Int64?

        @inlinable
        public init(billingGroupName: String, billingGroupProperties: BillingGroupProperties, expectedVersion: Int64? = nil) {
            self.billingGroupName = billingGroupName
            self.billingGroupProperties = billingGroupProperties
            self.expectedVersion = expectedVersion
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.billingGroupName, key: "billingGroupName")
            try container.encode(self.billingGroupProperties, forKey: .billingGroupProperties)
            try container.encodeIfPresent(self.expectedVersion, forKey: .expectedVersion)
        }

        public func validate(name: String) throws {
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, max: 128)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, min: 1)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.billingGroupProperties.validate(name: "\(name).billingGroupProperties")
        }

        private enum CodingKeys: String, CodingKey {
            case billingGroupProperties = "billingGroupProperties"
            case expectedVersion = "expectedVersion"
        }
    }

    public struct UpdateBillingGroupResponse: AWSDecodableShape {
        /// The latest version of the billing group.
        public let version: Int64?

        @inlinable
        public init(version: Int64? = nil) {
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case version = "version"
        }
    }

    public struct UpdateCACertificateParams: AWSEncodableShape & AWSDecodableShape {
        /// The action that you want to apply to the CA certificate. The only supported value is DEACTIVATE.
        public let action: CACertificateUpdateAction

        @inlinable
        public init(action: CACertificateUpdateAction) {
            self.action = action
        }

        private enum CodingKeys: String, CodingKey {
            case action = "action"
        }
    }

    public struct UpdateCACertificateRequest: AWSEncodableShape {
        /// The CA certificate identifier.
        public let certificateId: String
        /// The new value for the auto registration status. Valid values are: "ENABLE" or "DISABLE".
        public let newAutoRegistrationStatus: AutoRegistrationStatus?
        /// The updated status of the CA certificate.  Note: The status value REGISTER_INACTIVE is deprecated and should not be used.
        public let newStatus: CACertificateStatus?
        /// Information about the registration configuration.
        public let registrationConfig: RegistrationConfig?
        /// If true, removes auto registration.
        public let removeAutoRegistration: Bool?

        @inlinable
        public init(certificateId: String, newAutoRegistrationStatus: AutoRegistrationStatus? = nil, newStatus: CACertificateStatus? = nil, registrationConfig: RegistrationConfig? = nil, removeAutoRegistration: Bool? = nil) {
            self.certificateId = certificateId
            self.newAutoRegistrationStatus = newAutoRegistrationStatus
            self.newStatus = newStatus
            self.registrationConfig = registrationConfig
            self.removeAutoRegistration = removeAutoRegistration
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.certificateId, key: "certificateId")
            request.encodeQuery(self.newAutoRegistrationStatus, key: "newAutoRegistrationStatus")
            request.encodeQuery(self.newStatus, key: "newStatus")
            try container.encodeIfPresent(self.registrationConfig, forKey: .registrationConfig)
            try container.encodeIfPresent(self.removeAutoRegistration, forKey: .removeAutoRegistration)
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "^(0x)?[a-fA-F0-9]+$")
            try self.registrationConfig?.validate(name: "\(name).registrationConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case registrationConfig = "registrationConfig"
            case removeAutoRegistration = "removeAutoRegistration"
        }
    }

    public struct UpdateCertificateProviderRequest: AWSEncodableShape {
        /// A list of the operations that the certificate provider will use to generate certificates.  Valid value: CreateCertificateFromCsr.
        public let accountDefaultForOperations: [CertificateProviderOperation]?
        /// The name of the certificate provider.
        public let certificateProviderName: String
        /// The Lambda function ARN that's associated with the certificate provider.
        public let lambdaFunctionArn: String?

        @inlinable
        public init(accountDefaultForOperations: [CertificateProviderOperation]? = nil, certificateProviderName: String, lambdaFunctionArn: String? = nil) {
            self.accountDefaultForOperations = accountDefaultForOperations
            self.certificateProviderName = certificateProviderName
            self.lambdaFunctionArn = lambdaFunctionArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.accountDefaultForOperations, forKey: .accountDefaultForOperations)
            request.encodePath(self.certificateProviderName, key: "certificateProviderName")
            try container.encodeIfPresent(self.lambdaFunctionArn, forKey: .lambdaFunctionArn)
        }

        public func validate(name: String) throws {
            try self.validate(self.accountDefaultForOperations, name: "accountDefaultForOperations", parent: name, max: 1)
            try self.validate(self.accountDefaultForOperations, name: "accountDefaultForOperations", parent: name, min: 1)
            try self.validate(self.certificateProviderName, name: "certificateProviderName", parent: name, max: 128)
            try self.validate(self.certificateProviderName, name: "certificateProviderName", parent: name, min: 1)
            try self.validate(self.certificateProviderName, name: "certificateProviderName", parent: name, pattern: "^[\\w=,@-]+$")
            try self.validate(self.lambdaFunctionArn, name: "lambdaFunctionArn", parent: name, max: 2048)
            try self.validate(self.lambdaFunctionArn, name: "lambdaFunctionArn", parent: name, pattern: "^[\\s\\S]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case accountDefaultForOperations = "accountDefaultForOperations"
            case lambdaFunctionArn = "lambdaFunctionArn"
        }
    }

    public struct UpdateCertificateProviderResponse: AWSDecodableShape {
        /// The ARN of the certificate provider.
        public let certificateProviderArn: String?
        /// The name of the certificate provider.
        public let certificateProviderName: String?

        @inlinable
        public init(certificateProviderArn: String? = nil, certificateProviderName: String? = nil) {
            self.certificateProviderArn = certificateProviderArn
            self.certificateProviderName = certificateProviderName
        }

        private enum CodingKeys: String, CodingKey {
            case certificateProviderArn = "certificateProviderArn"
            case certificateProviderName = "certificateProviderName"
        }
    }

    public struct UpdateCertificateRequest: AWSEncodableShape {
        /// The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String
        /// The new status.  Note: Setting the status to PENDING_TRANSFER  or PENDING_ACTIVATION will result in an exception being thrown. PENDING_TRANSFER and PENDING_ACTIVATION are statuses used internally by IoT. They  are not intended for developer use.  Note: The status value REGISTER_INACTIVE is deprecated and should not be used.
        public let newStatus: CertificateStatus

        @inlinable
        public init(certificateId: String, newStatus: CertificateStatus) {
            self.certificateId = certificateId
            self.newStatus = newStatus
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.certificateId, key: "certificateId")
            request.encodeQuery(self.newStatus, key: "newStatus")
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "^(0x)?[a-fA-F0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UpdateCommandRequest: AWSEncodableShape {
        /// The unique identifier of the command to be updated.
        public let commandId: String
        /// A boolean that you can use to specify whether to deprecate a command.
        public let deprecated: Bool?
        /// A short text description of the command.
        public let description: String?
        /// The new user-friendly name to use in the console for the command.
        public let displayName: String?

        @inlinable
        public init(commandId: String, deprecated: Bool? = nil, description: String? = nil, displayName: String? = nil) {
            self.commandId = commandId
            self.deprecated = deprecated
            self.description = description
            self.displayName = displayName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.commandId, key: "commandId")
            try container.encodeIfPresent(self.deprecated, forKey: .deprecated)
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encodeIfPresent(self.displayName, forKey: .displayName)
        }

        public func validate(name: String) throws {
            try self.validate(self.commandId, name: "commandId", parent: name, max: 64)
            try self.validate(self.commandId, name: "commandId", parent: name, min: 1)
            try self.validate(self.commandId, name: "commandId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.description, name: "description", parent: name, max: 2028)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[^\\p{C}]*$")
            try self.validate(self.displayName, name: "displayName", parent: name, max: 64)
            try self.validate(self.displayName, name: "displayName", parent: name, pattern: "^[^\\p{C}]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case deprecated = "deprecated"
            case description = "description"
            case displayName = "displayName"
        }
    }

    public struct UpdateCommandResponse: AWSDecodableShape {
        /// The unique identifier of the command.
        public let commandId: String?
        /// The boolean that indicates whether the command was deprecated.
        public let deprecated: Bool?
        /// The updated text description of the command.
        public let description: String?
        /// The updated user-friendly display name in the console for the command.
        public let displayName: String?
        /// The date and time (epoch timestamp in seconds) when the command was last updated.
        public let lastUpdatedAt: Date?

        @inlinable
        public init(commandId: String? = nil, deprecated: Bool? = nil, description: String? = nil, displayName: String? = nil, lastUpdatedAt: Date? = nil) {
            self.commandId = commandId
            self.deprecated = deprecated
            self.description = description
            self.displayName = displayName
            self.lastUpdatedAt = lastUpdatedAt
        }

        private enum CodingKeys: String, CodingKey {
            case commandId = "commandId"
            case deprecated = "deprecated"
            case description = "description"
            case displayName = "displayName"
            case lastUpdatedAt = "lastUpdatedAt"
        }
    }

    public struct UpdateCustomMetricRequest: AWSEncodableShape {
        ///  Field represents a friendly name in the console for the custom metric, it doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated.
        public let displayName: String
        ///  The name of the custom metric. Cannot be updated.
        public let metricName: String

        @inlinable
        public init(displayName: String, metricName: String) {
            self.displayName = displayName
            self.metricName = metricName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.displayName, forKey: .displayName)
            request.encodePath(self.metricName, key: "metricName")
        }

        public func validate(name: String) throws {
            try self.validate(self.displayName, name: "displayName", parent: name, max: 128)
            try self.validate(self.displayName, name: "displayName", parent: name, pattern: "^[\\p{Graph}\\x20]*$")
            try self.validate(self.metricName, name: "metricName", parent: name, max: 128)
            try self.validate(self.metricName, name: "metricName", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case displayName = "displayName"
        }
    }

    public struct UpdateCustomMetricResponse: AWSDecodableShape {
        ///  The creation date of the custom metric in milliseconds since epoch.
        public let creationDate: Date?
        ///  A friendly name in the console for the custom metric
        public let displayName: String?
        ///  The time the custom metric was last modified in milliseconds since epoch.
        public let lastModifiedDate: Date?
        ///  The Amazon Resource Number (ARN) of the custom metric.
        public let metricArn: String?
        ///  The name of the custom metric.
        public let metricName: String?
        ///  The type of the custom metric.   The type number only takes a single metric value as an input, but while submitting the metrics value in the DeviceMetrics report, it must be passed as an array with a single value.
        public let metricType: CustomMetricType?

        @inlinable
        public init(creationDate: Date? = nil, displayName: String? = nil, lastModifiedDate: Date? = nil, metricArn: String? = nil, metricName: String? = nil, metricType: CustomMetricType? = nil) {
            self.creationDate = creationDate
            self.displayName = displayName
            self.lastModifiedDate = lastModifiedDate
            self.metricArn = metricArn
            self.metricName = metricName
            self.metricType = metricType
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate = "creationDate"
            case displayName = "displayName"
            case lastModifiedDate = "lastModifiedDate"
            case metricArn = "metricArn"
            case metricName = "metricName"
            case metricType = "metricType"
        }
    }

    public struct UpdateDeviceCertificateParams: AWSEncodableShape & AWSDecodableShape {
        /// The action that you want to apply to the device certificate. The only supported value is DEACTIVATE.
        public let action: DeviceCertificateUpdateAction

        @inlinable
        public init(action: DeviceCertificateUpdateAction) {
            self.action = action
        }

        private enum CodingKeys: String, CodingKey {
            case action = "action"
        }
    }

    public struct UpdateDimensionRequest: AWSEncodableShape {
        /// A unique identifier for the dimension. Choose something that describes the type and value to make it easy to remember what it does.
        public let name: String
        /// Specifies the value or list of values for the dimension. For TOPIC_FILTER dimensions, this is a pattern used to match the MQTT topic (for example, "admin/#").
        public let stringValues: [String]

        @inlinable
        public init(name: String, stringValues: [String]) {
            self.name = name
            self.stringValues = stringValues
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.name, key: "name")
            try container.encode(self.stringValues, forKey: .stringValues)
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.stringValues.forEach {
                try validate($0, name: "stringValues[]", parent: name, max: 256)
                try validate($0, name: "stringValues[]", parent: name, min: 1)
            }
            try self.validate(self.stringValues, name: "stringValues", parent: name, max: 100)
            try self.validate(self.stringValues, name: "stringValues", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case stringValues = "stringValues"
        }
    }

    public struct UpdateDimensionResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN)of the created dimension.
        public let arn: String?
        /// The date and time, in milliseconds since epoch, when the dimension was initially created.
        public let creationDate: Date?
        /// The date and time, in milliseconds since epoch, when the dimension was most recently updated.
        public let lastModifiedDate: Date?
        /// A unique identifier for the dimension.
        public let name: String?
        /// The value or list of values used to scope the dimension. For example, for topic filters, this is the pattern used to match the MQTT topic name.
        public let stringValues: [String]?
        /// The type of the dimension.
        public let type: DimensionType?

        @inlinable
        public init(arn: String? = nil, creationDate: Date? = nil, lastModifiedDate: Date? = nil, name: String? = nil, stringValues: [String]? = nil, type: DimensionType? = nil) {
            self.arn = arn
            self.creationDate = creationDate
            self.lastModifiedDate = lastModifiedDate
            self.name = name
            self.stringValues = stringValues
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case creationDate = "creationDate"
            case lastModifiedDate = "lastModifiedDate"
            case name = "name"
            case stringValues = "stringValues"
            case type = "type"
        }
    }

    public struct UpdateDomainConfigurationRequest: AWSEncodableShape {
        /// An enumerated string that speciﬁes the application-layer protocol.    SECURE_MQTT - MQTT over TLS.      MQTT_WSS - MQTT over WebSocket.      HTTPS - HTTP over TLS.      DEFAULT - Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify application_layer protocol.  For more information, see Device communication protocols.
        public let applicationProtocol: ApplicationProtocol?
        /// An enumerated string that speciﬁes the authentication type.    CUSTOM_AUTH_X509 - Use custom authentication and authorization with additional details from the X.509 client certificate.      CUSTOM_AUTH - Use custom authentication and authorization. For more information, see Custom authentication and authorization.      AWS_X509 - Use X.509 client certificates without custom authentication and authorization. For more information, see X.509 client certificates.      AWS_SIGV4 - Use Amazon Web Services Signature Version 4. For more information, see IAM users, groups, and roles.      DEFAULT  - Use a combination of port and Application Layer Protocol Negotiation (ALPN) to specify authentication type. For more information, see Device communication protocols.
        public let authenticationType: AuthenticationType?
        /// An object that specifies the authorization service for a domain.
        public let authorizerConfig: AuthorizerConfig?
        /// An object that speciﬁes the client certificate conﬁguration for a domain.
        public let clientCertificateConfig: ClientCertificateConfig?
        /// The name of the domain configuration to be updated.
        public let domainConfigurationName: String
        /// The status to which the domain configuration should be updated.
        public let domainConfigurationStatus: DomainConfigurationStatus?
        /// Removes the authorization configuration from a domain.
        public let removeAuthorizerConfig: Bool?
        /// The server certificate configuration.
        public let serverCertificateConfig: ServerCertificateConfig?
        /// An object that specifies the TLS configuration for a domain.
        public let tlsConfig: TlsConfig?

        @inlinable
        public init(applicationProtocol: ApplicationProtocol? = nil, authenticationType: AuthenticationType? = nil, authorizerConfig: AuthorizerConfig? = nil, clientCertificateConfig: ClientCertificateConfig? = nil, domainConfigurationName: String, domainConfigurationStatus: DomainConfigurationStatus? = nil, removeAuthorizerConfig: Bool? = nil, serverCertificateConfig: ServerCertificateConfig? = nil, tlsConfig: TlsConfig? = nil) {
            self.applicationProtocol = applicationProtocol
            self.authenticationType = authenticationType
            self.authorizerConfig = authorizerConfig
            self.clientCertificateConfig = clientCertificateConfig
            self.domainConfigurationName = domainConfigurationName
            self.domainConfigurationStatus = domainConfigurationStatus
            self.removeAuthorizerConfig = removeAuthorizerConfig
            self.serverCertificateConfig = serverCertificateConfig
            self.tlsConfig = tlsConfig
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.applicationProtocol, forKey: .applicationProtocol)
            try container.encodeIfPresent(self.authenticationType, forKey: .authenticationType)
            try container.encodeIfPresent(self.authorizerConfig, forKey: .authorizerConfig)
            try container.encodeIfPresent(self.clientCertificateConfig, forKey: .clientCertificateConfig)
            request.encodePath(self.domainConfigurationName, key: "domainConfigurationName")
            try container.encodeIfPresent(self.domainConfigurationStatus, forKey: .domainConfigurationStatus)
            try container.encodeIfPresent(self.removeAuthorizerConfig, forKey: .removeAuthorizerConfig)
            try container.encodeIfPresent(self.serverCertificateConfig, forKey: .serverCertificateConfig)
            try container.encodeIfPresent(self.tlsConfig, forKey: .tlsConfig)
        }

        public func validate(name: String) throws {
            try self.authorizerConfig?.validate(name: "\(name).authorizerConfig")
            try self.clientCertificateConfig?.validate(name: "\(name).clientCertificateConfig")
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, max: 128)
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, min: 1)
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, pattern: "^[\\w.:-]+$")
            try self.serverCertificateConfig?.validate(name: "\(name).serverCertificateConfig")
            try self.tlsConfig?.validate(name: "\(name).tlsConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case applicationProtocol = "applicationProtocol"
            case authenticationType = "authenticationType"
            case authorizerConfig = "authorizerConfig"
            case clientCertificateConfig = "clientCertificateConfig"
            case domainConfigurationStatus = "domainConfigurationStatus"
            case removeAuthorizerConfig = "removeAuthorizerConfig"
            case serverCertificateConfig = "serverCertificateConfig"
            case tlsConfig = "tlsConfig"
        }
    }

    public struct UpdateDomainConfigurationResponse: AWSDecodableShape {
        /// The ARN of the domain configuration that was updated.
        public let domainConfigurationArn: String?
        /// The name of the domain configuration that was updated.
        public let domainConfigurationName: String?

        @inlinable
        public init(domainConfigurationArn: String? = nil, domainConfigurationName: String? = nil) {
            self.domainConfigurationArn = domainConfigurationArn
            self.domainConfigurationName = domainConfigurationName
        }

        private enum CodingKeys: String, CodingKey {
            case domainConfigurationArn = "domainConfigurationArn"
            case domainConfigurationName = "domainConfigurationName"
        }
    }

    public struct UpdateDynamicThingGroupRequest: AWSEncodableShape {
        /// The expected version of the dynamic thing group to update.
        public let expectedVersion: Int64?
        /// The dynamic thing group index to update.  Currently one index is supported: AWS_Things.
        public let indexName: String?
        /// The dynamic thing group search query string to update.
        public let queryString: String?
        /// The dynamic thing group query version to update.  Currently one query version is supported: "2017-09-30". If not specified, the
        /// 				query version defaults to this value.
        public let queryVersion: String?
        /// The name of the dynamic thing group to update.
        public let thingGroupName: String
        /// The dynamic thing group properties to update.
        public let thingGroupProperties: ThingGroupProperties

        @inlinable
        public init(expectedVersion: Int64? = nil, indexName: String? = nil, queryString: String? = nil, queryVersion: String? = nil, thingGroupName: String, thingGroupProperties: ThingGroupProperties) {
            self.expectedVersion = expectedVersion
            self.indexName = indexName
            self.queryString = queryString
            self.queryVersion = queryVersion
            self.thingGroupName = thingGroupName
            self.thingGroupProperties = thingGroupProperties
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.expectedVersion, forKey: .expectedVersion)
            try container.encodeIfPresent(self.indexName, forKey: .indexName)
            try container.encodeIfPresent(self.queryString, forKey: .queryString)
            try container.encodeIfPresent(self.queryVersion, forKey: .queryVersion)
            request.encodePath(self.thingGroupName, key: "thingGroupName")
            try container.encode(self.thingGroupProperties, forKey: .thingGroupProperties)
        }

        public func validate(name: String) throws {
            try self.validate(self.indexName, name: "indexName", parent: name, max: 128)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.thingGroupProperties.validate(name: "\(name).thingGroupProperties")
        }

        private enum CodingKeys: String, CodingKey {
            case expectedVersion = "expectedVersion"
            case indexName = "indexName"
            case queryString = "queryString"
            case queryVersion = "queryVersion"
            case thingGroupProperties = "thingGroupProperties"
        }
    }

    public struct UpdateDynamicThingGroupResponse: AWSDecodableShape {
        /// The dynamic thing group version.
        public let version: Int64?

        @inlinable
        public init(version: Int64? = nil) {
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case version = "version"
        }
    }

    public struct UpdateEventConfigurationsRequest: AWSEncodableShape {
        /// The new event configuration values.
        public let eventConfigurations: [EventType: Configuration]?

        @inlinable
        public init(eventConfigurations: [EventType: Configuration]? = nil) {
            self.eventConfigurations = eventConfigurations
        }

        private enum CodingKeys: String, CodingKey {
            case eventConfigurations = "eventConfigurations"
        }
    }

    public struct UpdateEventConfigurationsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateFleetMetricRequest: AWSEncodableShape {
        /// The field to aggregate.
        public let aggregationField: String?
        /// The type of the aggregation query.
        public let aggregationType: AggregationType?
        /// The description of the fleet metric.
        public let description: String?
        /// The expected version of the fleet metric record in the registry.
        public let expectedVersion: Int64?
        /// The name of the index to search.
        public let indexName: String
        /// The name of the fleet metric to update.
        public let metricName: String
        /// The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 day)] and must be multiple of 60.
        public let period: Int?
        /// The search query string.
        public let queryString: String?
        /// The version of the query.
        public let queryVersion: String?
        /// Used to support unit transformation such as milliseconds to seconds. The unit must be supported by CW metric.
        public let unit: FleetMetricUnit?

        @inlinable
        public init(aggregationField: String? = nil, aggregationType: AggregationType? = nil, description: String? = nil, expectedVersion: Int64? = nil, indexName: String, metricName: String, period: Int? = nil, queryString: String? = nil, queryVersion: String? = nil, unit: FleetMetricUnit? = nil) {
            self.aggregationField = aggregationField
            self.aggregationType = aggregationType
            self.description = description
            self.expectedVersion = expectedVersion
            self.indexName = indexName
            self.metricName = metricName
            self.period = period
            self.queryString = queryString
            self.queryVersion = queryVersion
            self.unit = unit
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.aggregationField, forKey: .aggregationField)
            try container.encodeIfPresent(self.aggregationType, forKey: .aggregationType)
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encodeIfPresent(self.expectedVersion, forKey: .expectedVersion)
            try container.encode(self.indexName, forKey: .indexName)
            request.encodePath(self.metricName, key: "metricName")
            try container.encodeIfPresent(self.period, forKey: .period)
            try container.encodeIfPresent(self.queryString, forKey: .queryString)
            try container.encodeIfPresent(self.queryVersion, forKey: .queryVersion)
            try container.encodeIfPresent(self.unit, forKey: .unit)
        }

        public func validate(name: String) throws {
            try self.validate(self.aggregationField, name: "aggregationField", parent: name, min: 1)
            try self.aggregationType?.validate(name: "\(name).aggregationType")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\p{Graph}\\x20]*$")
            try self.validate(self.indexName, name: "indexName", parent: name, max: 128)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.metricName, name: "metricName", parent: name, max: 128)
            try self.validate(self.metricName, name: "metricName", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "^[a-zA-Z0-9_\\-\\.]+$")
            try self.validate(self.period, name: "period", parent: name, max: 86400)
            try self.validate(self.period, name: "period", parent: name, min: 60)
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case aggregationField = "aggregationField"
            case aggregationType = "aggregationType"
            case description = "description"
            case expectedVersion = "expectedVersion"
            case indexName = "indexName"
            case period = "period"
            case queryString = "queryString"
            case queryVersion = "queryVersion"
            case unit = "unit"
        }
    }

    public struct UpdateIndexingConfigurationRequest: AWSEncodableShape {
        /// Thing group indexing configuration.
        public let thingGroupIndexingConfiguration: ThingGroupIndexingConfiguration?
        /// Thing indexing configuration.
        public let thingIndexingConfiguration: ThingIndexingConfiguration?

        @inlinable
        public init(thingGroupIndexingConfiguration: ThingGroupIndexingConfiguration? = nil, thingIndexingConfiguration: ThingIndexingConfiguration? = nil) {
            self.thingGroupIndexingConfiguration = thingGroupIndexingConfiguration
            self.thingIndexingConfiguration = thingIndexingConfiguration
        }

        public func validate(name: String) throws {
            try self.thingIndexingConfiguration?.validate(name: "\(name).thingIndexingConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case thingGroupIndexingConfiguration = "thingGroupIndexingConfiguration"
            case thingIndexingConfiguration = "thingIndexingConfiguration"
        }
    }

    public struct UpdateIndexingConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateJobRequest: AWSEncodableShape {
        /// Allows you to create criteria to abort a job.
        public let abortConfig: AbortConfig?
        /// A short text description of the job.
        public let description: String?
        /// Allows you to create the criteria to retry a job.
        public let jobExecutionsRetryConfig: JobExecutionsRetryConfig?
        /// Allows you to create a staged rollout of the job.
        public let jobExecutionsRolloutConfig: JobExecutionsRolloutConfig?
        /// The ID of the job to be updated.
        public let jobId: String
        /// The namespace used to indicate that a job is a customer-managed job. When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.  $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/   The namespaceId feature is only supported by IoT Greengrass at this time. For more information, see Setting up IoT Greengrass core devices.
        public let namespaceId: String?
        /// Configuration information for pre-signed S3 URLs.
        public let presignedUrlConfig: PresignedUrlConfig?
        /// Specifies the amount of time each device has to finish its execution of the job. The timer is started when the job execution status is set to IN_PROGRESS. If the job execution status is not set to another terminal state before the time expires, it will be automatically set to TIMED_OUT.
        public let timeoutConfig: TimeoutConfig?

        @inlinable
        public init(abortConfig: AbortConfig? = nil, description: String? = nil, jobExecutionsRetryConfig: JobExecutionsRetryConfig? = nil, jobExecutionsRolloutConfig: JobExecutionsRolloutConfig? = nil, jobId: String, namespaceId: String? = nil, presignedUrlConfig: PresignedUrlConfig? = nil, timeoutConfig: TimeoutConfig? = nil) {
            self.abortConfig = abortConfig
            self.description = description
            self.jobExecutionsRetryConfig = jobExecutionsRetryConfig
            self.jobExecutionsRolloutConfig = jobExecutionsRolloutConfig
            self.jobId = jobId
            self.namespaceId = namespaceId
            self.presignedUrlConfig = presignedUrlConfig
            self.timeoutConfig = timeoutConfig
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.abortConfig, forKey: .abortConfig)
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encodeIfPresent(self.jobExecutionsRetryConfig, forKey: .jobExecutionsRetryConfig)
            try container.encodeIfPresent(self.jobExecutionsRolloutConfig, forKey: .jobExecutionsRolloutConfig)
            request.encodePath(self.jobId, key: "jobId")
            request.encodeQuery(self.namespaceId, key: "namespaceId")
            try container.encodeIfPresent(self.presignedUrlConfig, forKey: .presignedUrlConfig)
            try container.encodeIfPresent(self.timeoutConfig, forKey: .timeoutConfig)
        }

        public func validate(name: String) throws {
            try self.abortConfig?.validate(name: "\(name).abortConfig")
            try self.validate(self.description, name: "description", parent: name, max: 2028)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[^\\p{C}]+$")
            try self.jobExecutionsRetryConfig?.validate(name: "\(name).jobExecutionsRetryConfig")
            try self.jobExecutionsRolloutConfig?.validate(name: "\(name).jobExecutionsRolloutConfig")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.presignedUrlConfig?.validate(name: "\(name).presignedUrlConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case abortConfig = "abortConfig"
            case description = "description"
            case jobExecutionsRetryConfig = "jobExecutionsRetryConfig"
            case jobExecutionsRolloutConfig = "jobExecutionsRolloutConfig"
            case presignedUrlConfig = "presignedUrlConfig"
            case timeoutConfig = "timeoutConfig"
        }
    }

    public struct UpdateMitigationActionRequest: AWSEncodableShape {
        /// The friendly name for the mitigation action. You cannot change the name by using UpdateMitigationAction. Instead, you must delete and recreate the mitigation action with the new name.
        public let actionName: String
        /// Defines the type of action and the parameters for that action.
        public let actionParams: MitigationActionParams?
        /// The ARN of the IAM role that is used to apply the mitigation action.
        public let roleArn: String?

        @inlinable
        public init(actionName: String, actionParams: MitigationActionParams? = nil, roleArn: String? = nil) {
            self.actionName = actionName
            self.actionParams = actionParams
            self.roleArn = roleArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.actionName, key: "actionName")
            try container.encodeIfPresent(self.actionParams, forKey: .actionParams)
            try container.encodeIfPresent(self.roleArn, forKey: .roleArn)
        }

        public func validate(name: String) throws {
            try self.validate(self.actionName, name: "actionName", parent: name, max: 128)
            try self.validate(self.actionName, name: "actionName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
            try self.actionParams?.validate(name: "\(name).actionParams")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case actionParams = "actionParams"
            case roleArn = "roleArn"
        }
    }

    public struct UpdateMitigationActionResponse: AWSDecodableShape {
        /// The ARN for the new mitigation action.
        public let actionArn: String?
        /// A unique identifier for the mitigation action.
        public let actionId: String?

        @inlinable
        public init(actionArn: String? = nil, actionId: String? = nil) {
            self.actionArn = actionArn
            self.actionId = actionId
        }

        private enum CodingKeys: String, CodingKey {
            case actionArn = "actionArn"
            case actionId = "actionId"
        }
    }

    public struct UpdatePackageConfigurationRequest: AWSEncodableShape {
        /// A unique case-sensitive identifier that you can provide to ensure the idempotency of the request.  Don't reuse this client token if a new idempotent request is required.
        public let clientToken: String?
        /// Configuration to manage job's package version reporting. This updates the thing's reserved named shadow that the job targets.
        public let versionUpdateByJobsConfig: VersionUpdateByJobsConfig?

        @inlinable
        public init(clientToken: String? = UpdatePackageConfigurationRequest.idempotencyToken(), versionUpdateByJobsConfig: VersionUpdateByJobsConfig? = nil) {
            self.clientToken = clientToken
            self.versionUpdateByJobsConfig = versionUpdateByJobsConfig
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.clientToken, key: "clientToken")
            try container.encodeIfPresent(self.versionUpdateByJobsConfig, forKey: .versionUpdateByJobsConfig)
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 36)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^\\S{36,64}$")
            try self.versionUpdateByJobsConfig?.validate(name: "\(name).versionUpdateByJobsConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case versionUpdateByJobsConfig = "versionUpdateByJobsConfig"
        }
    }

    public struct UpdatePackageConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdatePackageRequest: AWSEncodableShape {
        /// A unique case-sensitive identifier that you can provide to ensure the idempotency of the request.  Don't reuse this client token if a new idempotent request is required.
        public let clientToken: String?
        /// The name of the default package version.  Note: You cannot name a defaultVersion and set unsetDefaultVersion equal to true at the same time.
        public let defaultVersionName: String?
        /// The package description.
        public let description: String?
        /// The name of the target software package.
        public let packageName: String
        /// Indicates whether you want to remove the named default package version from the software package.  Set as true to remove the default package version.   Note: You cannot name a defaultVersion and set unsetDefaultVersion equal to true at the same time.
        public let unsetDefaultVersion: Bool?

        @inlinable
        public init(clientToken: String? = UpdatePackageRequest.idempotencyToken(), defaultVersionName: String? = nil, description: String? = nil, packageName: String, unsetDefaultVersion: Bool? = nil) {
            self.clientToken = clientToken
            self.defaultVersionName = defaultVersionName
            self.description = description
            self.packageName = packageName
            self.unsetDefaultVersion = unsetDefaultVersion
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.clientToken, key: "clientToken")
            try container.encodeIfPresent(self.defaultVersionName, forKey: .defaultVersionName)
            try container.encodeIfPresent(self.description, forKey: .description)
            request.encodePath(self.packageName, key: "packageName")
            try container.encodeIfPresent(self.unsetDefaultVersion, forKey: .unsetDefaultVersion)
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 36)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^\\S{36,64}$")
            try self.validate(self.defaultVersionName, name: "defaultVersionName", parent: name, max: 64)
            try self.validate(self.defaultVersionName, name: "defaultVersionName", parent: name, min: 1)
            try self.validate(self.defaultVersionName, name: "defaultVersionName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[^\\p{C}]+$")
            try self.validate(self.packageName, name: "packageName", parent: name, max: 128)
            try self.validate(self.packageName, name: "packageName", parent: name, min: 1)
            try self.validate(self.packageName, name: "packageName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case defaultVersionName = "defaultVersionName"
            case description = "description"
            case unsetDefaultVersion = "unsetDefaultVersion"
        }
    }

    public struct UpdatePackageResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdatePackageVersionRequest: AWSEncodableShape {
        /// The status that the package version should be assigned. For more information, see Package version lifecycle.
        public let action: PackageVersionAction?
        /// The various components that make up a software package version.
        public let artifact: PackageVersionArtifact?
        /// Metadata that can be used to define a package version’s configuration. For example, the Amazon S3 file location, configuration options that are being sent to the device or fleet.   Note: Attributes can be updated only when the package version is in a draft state. The combined size of all the attributes on a package version is limited to 3KB.
        public let attributes: [String: String]?
        /// A unique case-sensitive identifier that you can provide to ensure the idempotency of the request.  Don't reuse this client token if a new idempotent request is required.
        public let clientToken: String?
        /// The package version description.
        public let description: String?
        /// The name of the associated software package.
        public let packageName: String
        /// The inline job document associated with a software package version used for a quick job deployment.
        public let recipe: String?
        /// The name of the target package version.
        public let versionName: String

        @inlinable
        public init(action: PackageVersionAction? = nil, artifact: PackageVersionArtifact? = nil, attributes: [String: String]? = nil, clientToken: String? = UpdatePackageVersionRequest.idempotencyToken(), description: String? = nil, packageName: String, recipe: String? = nil, versionName: String) {
            self.action = action
            self.artifact = artifact
            self.attributes = attributes
            self.clientToken = clientToken
            self.description = description
            self.packageName = packageName
            self.recipe = recipe
            self.versionName = versionName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.action, forKey: .action)
            try container.encodeIfPresent(self.artifact, forKey: .artifact)
            try container.encodeIfPresent(self.attributes, forKey: .attributes)
            request.encodeQuery(self.clientToken, key: "clientToken")
            try container.encodeIfPresent(self.description, forKey: .description)
            request.encodePath(self.packageName, key: "packageName")
            try container.encodeIfPresent(self.recipe, forKey: .recipe)
            request.encodePath(self.versionName, key: "versionName")
        }

        public func validate(name: String) throws {
            try self.artifact?.validate(name: "\(name).artifact")
            try self.attributes?.forEach {
                try validate($0.key, name: "attributes.key", parent: name, min: 1)
                try validate($0.key, name: "attributes.key", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, pattern: "^[^\\p{C}]+$")
            }
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 36)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^\\S{36,64}$")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[^\\p{C}]+$")
            try self.validate(self.packageName, name: "packageName", parent: name, max: 128)
            try self.validate(self.packageName, name: "packageName", parent: name, min: 1)
            try self.validate(self.packageName, name: "packageName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
            try self.validate(self.recipe, name: "recipe", parent: name, max: 3072)
            try self.validate(self.versionName, name: "versionName", parent: name, max: 64)
            try self.validate(self.versionName, name: "versionName", parent: name, min: 1)
            try self.validate(self.versionName, name: "versionName", parent: name, pattern: "^[a-zA-Z0-9-_.]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case action = "action"
            case artifact = "artifact"
            case attributes = "attributes"
            case description = "description"
            case recipe = "recipe"
        }
    }

    public struct UpdatePackageVersionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateProvisioningTemplateRequest: AWSEncodableShape {
        /// The ID of the default provisioning template version.
        public let defaultVersionId: Int?
        /// The description of the provisioning template.
        public let description: String?
        /// True to enable the provisioning template, otherwise false.
        public let enabled: Bool?
        /// Updates the pre-provisioning hook template. Only supports template of type FLEET_PROVISIONING. For more information about provisioning template types, see type.
        public let preProvisioningHook: ProvisioningHook?
        /// The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a device.
        public let provisioningRoleArn: String?
        /// Removes pre-provisioning hook template.
        public let removePreProvisioningHook: Bool?
        /// The name of the provisioning template.
        public let templateName: String

        @inlinable
        public init(defaultVersionId: Int? = nil, description: String? = nil, enabled: Bool? = nil, preProvisioningHook: ProvisioningHook? = nil, provisioningRoleArn: String? = nil, removePreProvisioningHook: Bool? = nil, templateName: String) {
            self.defaultVersionId = defaultVersionId
            self.description = description
            self.enabled = enabled
            self.preProvisioningHook = preProvisioningHook
            self.provisioningRoleArn = provisioningRoleArn
            self.removePreProvisioningHook = removePreProvisioningHook
            self.templateName = templateName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.defaultVersionId, forKey: .defaultVersionId)
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encodeIfPresent(self.enabled, forKey: .enabled)
            try container.encodeIfPresent(self.preProvisioningHook, forKey: .preProvisioningHook)
            try container.encodeIfPresent(self.provisioningRoleArn, forKey: .provisioningRoleArn)
            try container.encodeIfPresent(self.removePreProvisioningHook, forKey: .removePreProvisioningHook)
            request.encodePath(self.templateName, key: "templateName")
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 500)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[^\\p{C}]*$")
            try self.preProvisioningHook?.validate(name: "\(name).preProvisioningHook")
            try self.validate(self.provisioningRoleArn, name: "provisioningRoleArn", parent: name, max: 2048)
            try self.validate(self.provisioningRoleArn, name: "provisioningRoleArn", parent: name, min: 20)
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case defaultVersionId = "defaultVersionId"
            case description = "description"
            case enabled = "enabled"
            case preProvisioningHook = "preProvisioningHook"
            case provisioningRoleArn = "provisioningRoleArn"
            case removePreProvisioningHook = "removePreProvisioningHook"
        }
    }

    public struct UpdateProvisioningTemplateResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateRoleAliasRequest: AWSEncodableShape {
        /// The number of seconds the credential will be valid. This value must be less than or equal to the maximum session duration of the IAM role that the role alias references.
        public let credentialDurationSeconds: Int?
        /// The role alias to update.
        public let roleAlias: String
        /// The role ARN.
        public let roleArn: String?

        @inlinable
        public init(credentialDurationSeconds: Int? = nil, roleAlias: String, roleArn: String? = nil) {
            self.credentialDurationSeconds = credentialDurationSeconds
            self.roleAlias = roleAlias
            self.roleArn = roleArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.credentialDurationSeconds, forKey: .credentialDurationSeconds)
            request.encodePath(self.roleAlias, key: "roleAlias")
            try container.encodeIfPresent(self.roleArn, forKey: .roleArn)
        }

        public func validate(name: String) throws {
            try self.validate(self.credentialDurationSeconds, name: "credentialDurationSeconds", parent: name, max: 43200)
            try self.validate(self.credentialDurationSeconds, name: "credentialDurationSeconds", parent: name, min: 900)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, max: 128)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, min: 1)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, pattern: "^[\\w=,@-]+$")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case credentialDurationSeconds = "credentialDurationSeconds"
            case roleArn = "roleArn"
        }
    }

    public struct UpdateRoleAliasResponse: AWSDecodableShape {
        /// The role alias.
        public let roleAlias: String?
        /// The role alias ARN.
        public let roleAliasArn: String?

        @inlinable
        public init(roleAlias: String? = nil, roleAliasArn: String? = nil) {
            self.roleAlias = roleAlias
            self.roleAliasArn = roleAliasArn
        }

        private enum CodingKeys: String, CodingKey {
            case roleAlias = "roleAlias"
            case roleAliasArn = "roleAliasArn"
        }
    }

    public struct UpdateScheduledAuditRequest: AWSEncodableShape {
        /// The day of the month on which the scheduled audit takes place. This can be 1 through 31 or LAST. This field is required if the frequency parameter is set to MONTHLY. If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.
        public let dayOfMonth: String?
        /// The day of the week on which the scheduled audit takes place. This can be one of SUN, MON, TUE, WED, THU, FRI, or SAT. This field is required if the "frequency" parameter is set to WEEKLY or BIWEEKLY.
        public let dayOfWeek: DayOfWeek?
        /// How often the scheduled audit takes place, either DAILY, WEEKLY, BIWEEKLY, or MONTHLY. The start time of each audit is determined by the system.
        public let frequency: AuditFrequency?
        /// The name of the scheduled audit. (Max. 128 chars)
        public let scheduledAuditName: String
        /// Which checks are performed during the scheduled audit. Checks must be enabled  for your account. (Use DescribeAccountAuditConfiguration to see the list of all checks, including those that are enabled or use UpdateAccountAuditConfiguration  to select which checks are enabled.)
        public let targetCheckNames: [String]?

        @inlinable
        public init(dayOfMonth: String? = nil, dayOfWeek: DayOfWeek? = nil, frequency: AuditFrequency? = nil, scheduledAuditName: String, targetCheckNames: [String]? = nil) {
            self.dayOfMonth = dayOfMonth
            self.dayOfWeek = dayOfWeek
            self.frequency = frequency
            self.scheduledAuditName = scheduledAuditName
            self.targetCheckNames = targetCheckNames
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.dayOfMonth, forKey: .dayOfMonth)
            try container.encodeIfPresent(self.dayOfWeek, forKey: .dayOfWeek)
            try container.encodeIfPresent(self.frequency, forKey: .frequency)
            request.encodePath(self.scheduledAuditName, key: "scheduledAuditName")
            try container.encodeIfPresent(self.targetCheckNames, forKey: .targetCheckNames)
        }

        public func validate(name: String) throws {
            try self.validate(self.dayOfMonth, name: "dayOfMonth", parent: name, pattern: "^([1-9]|[12][0-9]|3[01])$|^LAST$")
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, max: 128)
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, min: 1)
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case dayOfMonth = "dayOfMonth"
            case dayOfWeek = "dayOfWeek"
            case frequency = "frequency"
            case targetCheckNames = "targetCheckNames"
        }
    }

    public struct UpdateScheduledAuditResponse: AWSDecodableShape {
        /// The ARN of the scheduled audit.
        public let scheduledAuditArn: String?

        @inlinable
        public init(scheduledAuditArn: String? = nil) {
            self.scheduledAuditArn = scheduledAuditArn
        }

        private enum CodingKeys: String, CodingKey {
            case scheduledAuditArn = "scheduledAuditArn"
        }
    }

    public struct UpdateSecurityProfileRequest: AWSEncodableShape {
        ///  Please use UpdateSecurityProfileRequest$additionalMetricsToRetainV2 instead.  A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's behaviors, but it is also retained for any metric specified here. Can be used with custom metrics; cannot be used with dimensions.
        public let additionalMetricsToRetain: [String]?
        /// A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's behaviors, but it is also retained for any metric specified here. Can be used with custom metrics; cannot be used with dimensions.
        public let additionalMetricsToRetainV2: [MetricToRetain]?
        /// Where the alerts are sent. (Alerts are always sent to the console.)
        public let alertTargets: [AlertTargetType: AlertTarget]?
        /// Specifies the behaviors that, when violated by a device (thing), cause an alert.
        public let behaviors: [Behavior]?
        /// If true, delete all additionalMetricsToRetain defined for this  security profile. If any additionalMetricsToRetain are defined in the current  invocation, an exception occurs.
        public let deleteAdditionalMetricsToRetain: Bool?
        /// If true, delete all alertTargets defined for this security profile.  If any alertTargets are defined in the current invocation, an exception occurs.
        public let deleteAlertTargets: Bool?
        /// If true, delete all behaviors defined for this security profile.  If any behaviors are defined in the current invocation, an exception occurs.
        public let deleteBehaviors: Bool?
        /// Set the value as true to delete metrics export related configurations.
        public let deleteMetricsExportConfig: Bool?
        /// The expected version of the security profile. A new version is generated whenever the security profile is updated. If you specify a value that is different from the actual version, a VersionConflictException is thrown.
        public let expectedVersion: Int64?
        /// Specifies the MQTT topic and role ARN required for metric export.
        public let metricsExportConfig: MetricsExportConfig?
        /// A description of the security profile.
        public let securityProfileDescription: String?
        /// The name of the security profile you want to update.
        public let securityProfileName: String

        @inlinable
        public init(additionalMetricsToRetainV2: [MetricToRetain]? = nil, alertTargets: [AlertTargetType: AlertTarget]? = nil, behaviors: [Behavior]? = nil, deleteAdditionalMetricsToRetain: Bool? = nil, deleteAlertTargets: Bool? = nil, deleteBehaviors: Bool? = nil, deleteMetricsExportConfig: Bool? = nil, expectedVersion: Int64? = nil, metricsExportConfig: MetricsExportConfig? = nil, securityProfileDescription: String? = nil, securityProfileName: String) {
            self.additionalMetricsToRetain = nil
            self.additionalMetricsToRetainV2 = additionalMetricsToRetainV2
            self.alertTargets = alertTargets
            self.behaviors = behaviors
            self.deleteAdditionalMetricsToRetain = deleteAdditionalMetricsToRetain
            self.deleteAlertTargets = deleteAlertTargets
            self.deleteBehaviors = deleteBehaviors
            self.deleteMetricsExportConfig = deleteMetricsExportConfig
            self.expectedVersion = expectedVersion
            self.metricsExportConfig = metricsExportConfig
            self.securityProfileDescription = securityProfileDescription
            self.securityProfileName = securityProfileName
        }

        @available(*, deprecated, message: "Members additionalMetricsToRetain have been deprecated")
        @inlinable
        public init(additionalMetricsToRetain: [String]? = nil, additionalMetricsToRetainV2: [MetricToRetain]? = nil, alertTargets: [AlertTargetType: AlertTarget]? = nil, behaviors: [Behavior]? = nil, deleteAdditionalMetricsToRetain: Bool? = nil, deleteAlertTargets: Bool? = nil, deleteBehaviors: Bool? = nil, deleteMetricsExportConfig: Bool? = nil, expectedVersion: Int64? = nil, metricsExportConfig: MetricsExportConfig? = nil, securityProfileDescription: String? = nil, securityProfileName: String) {
            self.additionalMetricsToRetain = additionalMetricsToRetain
            self.additionalMetricsToRetainV2 = additionalMetricsToRetainV2
            self.alertTargets = alertTargets
            self.behaviors = behaviors
            self.deleteAdditionalMetricsToRetain = deleteAdditionalMetricsToRetain
            self.deleteAlertTargets = deleteAlertTargets
            self.deleteBehaviors = deleteBehaviors
            self.deleteMetricsExportConfig = deleteMetricsExportConfig
            self.expectedVersion = expectedVersion
            self.metricsExportConfig = metricsExportConfig
            self.securityProfileDescription = securityProfileDescription
            self.securityProfileName = securityProfileName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.additionalMetricsToRetain, forKey: .additionalMetricsToRetain)
            try container.encodeIfPresent(self.additionalMetricsToRetainV2, forKey: .additionalMetricsToRetainV2)
            try container.encodeIfPresent(self.alertTargets, forKey: .alertTargets)
            try container.encodeIfPresent(self.behaviors, forKey: .behaviors)
            try container.encodeIfPresent(self.deleteAdditionalMetricsToRetain, forKey: .deleteAdditionalMetricsToRetain)
            try container.encodeIfPresent(self.deleteAlertTargets, forKey: .deleteAlertTargets)
            try container.encodeIfPresent(self.deleteBehaviors, forKey: .deleteBehaviors)
            try container.encodeIfPresent(self.deleteMetricsExportConfig, forKey: .deleteMetricsExportConfig)
            request.encodeQuery(self.expectedVersion, key: "expectedVersion")
            try container.encodeIfPresent(self.metricsExportConfig, forKey: .metricsExportConfig)
            try container.encodeIfPresent(self.securityProfileDescription, forKey: .securityProfileDescription)
            request.encodePath(self.securityProfileName, key: "securityProfileName")
        }

        public func validate(name: String) throws {
            try self.additionalMetricsToRetainV2?.forEach {
                try $0.validate(name: "\(name).additionalMetricsToRetainV2[]")
            }
            try self.alertTargets?.forEach {
                try $0.value.validate(name: "\(name).alertTargets[\"\($0.key)\"]")
            }
            try self.behaviors?.forEach {
                try $0.validate(name: "\(name).behaviors[]")
            }
            try self.validate(self.behaviors, name: "behaviors", parent: name, max: 100)
            try self.metricsExportConfig?.validate(name: "\(name).metricsExportConfig")
            try self.validate(self.securityProfileDescription, name: "securityProfileDescription", parent: name, max: 1000)
            try self.validate(self.securityProfileDescription, name: "securityProfileDescription", parent: name, pattern: "^[\\p{Graph}\\x20]*$")
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case additionalMetricsToRetain = "additionalMetricsToRetain"
            case additionalMetricsToRetainV2 = "additionalMetricsToRetainV2"
            case alertTargets = "alertTargets"
            case behaviors = "behaviors"
            case deleteAdditionalMetricsToRetain = "deleteAdditionalMetricsToRetain"
            case deleteAlertTargets = "deleteAlertTargets"
            case deleteBehaviors = "deleteBehaviors"
            case deleteMetricsExportConfig = "deleteMetricsExportConfig"
            case metricsExportConfig = "metricsExportConfig"
            case securityProfileDescription = "securityProfileDescription"
        }
    }

    public struct UpdateSecurityProfileResponse: AWSDecodableShape {
        ///  Please use UpdateSecurityProfileResponse$additionalMetricsToRetainV2 instead.  A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the security profile's behaviors, but it is also retained for any metric specified here.
        public let additionalMetricsToRetain: [String]?
        /// A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's behaviors, but it is also retained for any metric specified here. Can be used with custom metrics; cannot be used with dimensions.
        public let additionalMetricsToRetainV2: [MetricToRetain]?
        /// Where the alerts are sent. (Alerts are always sent to the console.)
        public let alertTargets: [AlertTargetType: AlertTarget]?
        /// Specifies the behaviors that, when violated by a device (thing), cause an alert.
        public let behaviors: [Behavior]?
        /// The time the security profile was created.
        public let creationDate: Date?
        /// The time the security profile was last modified.
        public let lastModifiedDate: Date?
        /// Specifies the MQTT topic and role ARN required for metric export.
        public let metricsExportConfig: MetricsExportConfig?
        /// The ARN of the security profile that was updated.
        public let securityProfileArn: String?
        /// The description of the security profile.
        public let securityProfileDescription: String?
        /// The name of the security profile that was updated.
        public let securityProfileName: String?
        /// The updated version of the security profile.
        public let version: Int64?

        @inlinable
        public init(additionalMetricsToRetainV2: [MetricToRetain]? = nil, alertTargets: [AlertTargetType: AlertTarget]? = nil, behaviors: [Behavior]? = nil, creationDate: Date? = nil, lastModifiedDate: Date? = nil, metricsExportConfig: MetricsExportConfig? = nil, securityProfileArn: String? = nil, securityProfileDescription: String? = nil, securityProfileName: String? = nil, version: Int64? = nil) {
            self.additionalMetricsToRetain = nil
            self.additionalMetricsToRetainV2 = additionalMetricsToRetainV2
            self.alertTargets = alertTargets
            self.behaviors = behaviors
            self.creationDate = creationDate
            self.lastModifiedDate = lastModifiedDate
            self.metricsExportConfig = metricsExportConfig
            self.securityProfileArn = securityProfileArn
            self.securityProfileDescription = securityProfileDescription
            self.securityProfileName = securityProfileName
            self.version = version
        }

        @available(*, deprecated, message: "Members additionalMetricsToRetain have been deprecated")
        @inlinable
        public init(additionalMetricsToRetain: [String]? = nil, additionalMetricsToRetainV2: [MetricToRetain]? = nil, alertTargets: [AlertTargetType: AlertTarget]? = nil, behaviors: [Behavior]? = nil, creationDate: Date? = nil, lastModifiedDate: Date? = nil, metricsExportConfig: MetricsExportConfig? = nil, securityProfileArn: String? = nil, securityProfileDescription: String? = nil, securityProfileName: String? = nil, version: Int64? = nil) {
            self.additionalMetricsToRetain = additionalMetricsToRetain
            self.additionalMetricsToRetainV2 = additionalMetricsToRetainV2
            self.alertTargets = alertTargets
            self.behaviors = behaviors
            self.creationDate = creationDate
            self.lastModifiedDate = lastModifiedDate
            self.metricsExportConfig = metricsExportConfig
            self.securityProfileArn = securityProfileArn
            self.securityProfileDescription = securityProfileDescription
            self.securityProfileName = securityProfileName
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case additionalMetricsToRetain = "additionalMetricsToRetain"
            case additionalMetricsToRetainV2 = "additionalMetricsToRetainV2"
            case alertTargets = "alertTargets"
            case behaviors = "behaviors"
            case creationDate = "creationDate"
            case lastModifiedDate = "lastModifiedDate"
            case metricsExportConfig = "metricsExportConfig"
            case securityProfileArn = "securityProfileArn"
            case securityProfileDescription = "securityProfileDescription"
            case securityProfileName = "securityProfileName"
            case version = "version"
        }
    }

    public struct UpdateStreamRequest: AWSEncodableShape {
        /// The description of the stream.
        public let description: String?
        /// The files associated with the stream.
        public let files: [StreamFile]?
        /// An IAM role that allows the IoT service principal assumes to access your S3 files.
        public let roleArn: String?
        /// The stream ID.
        public let streamId: String

        @inlinable
        public init(description: String? = nil, files: [StreamFile]? = nil, roleArn: String? = nil, streamId: String) {
            self.description = description
            self.files = files
            self.roleArn = roleArn
            self.streamId = streamId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encodeIfPresent(self.files, forKey: .files)
            try container.encodeIfPresent(self.roleArn, forKey: .roleArn)
            request.encodePath(self.streamId, key: "streamId")
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 2028)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[^\\p{C}]+$")
            try self.files?.forEach {
                try $0.validate(name: "\(name).files[]")
            }
            try self.validate(self.files, name: "files", parent: name, max: 50)
            try self.validate(self.files, name: "files", parent: name, min: 1)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.streamId, name: "streamId", parent: name, max: 128)
            try self.validate(self.streamId, name: "streamId", parent: name, min: 1)
            try self.validate(self.streamId, name: "streamId", parent: name, pattern: "^[a-zA-Z0-9_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case files = "files"
            case roleArn = "roleArn"
        }
    }

    public struct UpdateStreamResponse: AWSDecodableShape {
        /// A description of the stream.
        public let description: String?
        /// The stream ARN.
        public let streamArn: String?
        /// The stream ID.
        public let streamId: String?
        /// The stream version.
        public let streamVersion: Int?

        @inlinable
        public init(description: String? = nil, streamArn: String? = nil, streamId: String? = nil, streamVersion: Int? = nil) {
            self.description = description
            self.streamArn = streamArn
            self.streamId = streamId
            self.streamVersion = streamVersion
        }

        private enum CodingKeys: String, CodingKey {
            case description = "description"
            case streamArn = "streamArn"
            case streamId = "streamId"
            case streamVersion = "streamVersion"
        }
    }

    public struct UpdateThingGroupRequest: AWSEncodableShape {
        /// The expected version of the thing group. If this does not match the version of the
        /// 			thing group being updated, the update will fail.
        public let expectedVersion: Int64?
        /// The thing group to update.
        public let thingGroupName: String
        /// The thing group properties.
        public let thingGroupProperties: ThingGroupProperties

        @inlinable
        public init(expectedVersion: Int64? = nil, thingGroupName: String, thingGroupProperties: ThingGroupProperties) {
            self.expectedVersion = expectedVersion
            self.thingGroupName = thingGroupName
            self.thingGroupProperties = thingGroupProperties
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.expectedVersion, forKey: .expectedVersion)
            request.encodePath(self.thingGroupName, key: "thingGroupName")
            try container.encode(self.thingGroupProperties, forKey: .thingGroupProperties)
        }

        public func validate(name: String) throws {
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.thingGroupProperties.validate(name: "\(name).thingGroupProperties")
        }

        private enum CodingKeys: String, CodingKey {
            case expectedVersion = "expectedVersion"
            case thingGroupProperties = "thingGroupProperties"
        }
    }

    public struct UpdateThingGroupResponse: AWSDecodableShape {
        /// The version of the updated thing group.
        public let version: Int64?

        @inlinable
        public init(version: Int64? = nil) {
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case version = "version"
        }
    }

    public struct UpdateThingGroupsForThingRequest: AWSEncodableShape {
        /// Override dynamic thing groups with static thing groups when 10-group limit is
        /// 			reached. If a thing belongs to 10 thing groups, and one or more of those groups are
        /// 			dynamic thing groups, adding a thing to a static group removes the thing from the last
        /// 			dynamic group.
        public let overrideDynamicGroups: Bool?
        /// The groups to which the thing will be added.
        public let thingGroupsToAdd: [String]?
        /// The groups from which the thing will be removed.
        public let thingGroupsToRemove: [String]?
        /// The thing whose group memberships will be updated.
        public let thingName: String?

        @inlinable
        public init(overrideDynamicGroups: Bool? = nil, thingGroupsToAdd: [String]? = nil, thingGroupsToRemove: [String]? = nil, thingName: String? = nil) {
            self.overrideDynamicGroups = overrideDynamicGroups
            self.thingGroupsToAdd = thingGroupsToAdd
            self.thingGroupsToRemove = thingGroupsToRemove
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.thingGroupsToAdd?.forEach {
                try validate($0, name: "thingGroupsToAdd[]", parent: name, max: 128)
                try validate($0, name: "thingGroupsToAdd[]", parent: name, min: 1)
                try validate($0, name: "thingGroupsToAdd[]", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            }
            try self.thingGroupsToRemove?.forEach {
                try validate($0, name: "thingGroupsToRemove[]", parent: name, max: 128)
                try validate($0, name: "thingGroupsToRemove[]", parent: name, min: 1)
                try validate($0, name: "thingGroupsToRemove[]", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            }
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case overrideDynamicGroups = "overrideDynamicGroups"
            case thingGroupsToAdd = "thingGroupsToAdd"
            case thingGroupsToRemove = "thingGroupsToRemove"
            case thingName = "thingName"
        }
    }

    public struct UpdateThingGroupsForThingResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateThingRequest: AWSEncodableShape {
        /// A list of thing attributes, a JSON string containing name-value pairs. For
        /// 			example:  {\"attributes\":{\"name1\":\"value2\"}}  This data is used to add new attributes or update existing attributes.
        public let attributePayload: AttributePayload?
        /// The expected version of the thing record in the registry. If the version of the
        /// 			record in the registry does not match the expected version specified in the request, the
        /// 				UpdateThing request is rejected with a
        /// 				VersionConflictException.
        public let expectedVersion: Int64?
        /// Remove a thing type association. If true, the
        /// 			association is removed.
        public let removeThingType: Bool?
        /// The name of the thing to update. You can't change a thing's name. To change a thing's name, you must create a
        /// 			new thing, give it the new name, and then delete the old thing.
        public let thingName: String
        /// The name of the thing type.
        public let thingTypeName: String?

        @inlinable
        public init(attributePayload: AttributePayload? = nil, expectedVersion: Int64? = nil, removeThingType: Bool? = nil, thingName: String, thingTypeName: String? = nil) {
            self.attributePayload = attributePayload
            self.expectedVersion = expectedVersion
            self.removeThingType = removeThingType
            self.thingName = thingName
            self.thingTypeName = thingTypeName
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.attributePayload, forKey: .attributePayload)
            try container.encodeIfPresent(self.expectedVersion, forKey: .expectedVersion)
            try container.encodeIfPresent(self.removeThingType, forKey: .removeThingType)
            request.encodePath(self.thingName, key: "thingName")
            try container.encodeIfPresent(self.thingTypeName, forKey: .thingTypeName)
        }

        public func validate(name: String) throws {
            try self.attributePayload?.validate(name: "\(name).attributePayload")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, max: 128)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributePayload = "attributePayload"
            case expectedVersion = "expectedVersion"
            case removeThingType = "removeThingType"
            case thingTypeName = "thingTypeName"
        }
    }

    public struct UpdateThingResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateThingTypeRequest: AWSEncodableShape {
        /// The name of a thing type.
        public let thingTypeName: String
        public let thingTypeProperties: ThingTypeProperties?

        @inlinable
        public init(thingTypeName: String, thingTypeProperties: ThingTypeProperties? = nil) {
            self.thingTypeName = thingTypeName
            self.thingTypeProperties = thingTypeProperties
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.thingTypeName, key: "thingTypeName")
            try container.encodeIfPresent(self.thingTypeProperties, forKey: .thingTypeProperties)
        }

        public func validate(name: String) throws {
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, max: 128)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, pattern: "^[a-zA-Z0-9:_-]+$")
            try self.thingTypeProperties?.validate(name: "\(name).thingTypeProperties")
        }

        private enum CodingKeys: String, CodingKey {
            case thingTypeProperties = "thingTypeProperties"
        }
    }

    public struct UpdateThingTypeResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateTopicRuleDestinationRequest: AWSEncodableShape {
        /// The ARN of the topic rule destination.
        public let arn: String
        /// The status of the topic rule destination. Valid values are:  IN_PROGRESS  A topic rule destination was created but has not been confirmed. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.  ENABLED  Confirmation was completed, and traffic to this destination is allowed. You can set status to DISABLED by calling UpdateTopicRuleDestination.  DISABLED  Confirmation was completed, and traffic to this destination is not allowed. You can set status to ENABLED by calling UpdateTopicRuleDestination.  ERROR  Confirmation could not be completed, for example if the confirmation timed out. You can call GetTopicRuleDestination for details about the error. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.
        public let status: TopicRuleDestinationStatus

        @inlinable
        public init(arn: String, status: TopicRuleDestinationStatus) {
            self.arn = arn
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "arn"
            case status = "status"
        }
    }

    public struct UpdateTopicRuleDestinationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UserProperty: AWSEncodableShape & AWSDecodableShape {
        /// A key to be specified in UserProperty.
        public let key: String
        /// A value to be specified in UserProperty.
        public let value: String

        @inlinable
        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 1024)
            try self.validate(self.value, name: "value", parent: name, max: 1024)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "key"
            case value = "value"
        }
    }

    public struct ValidateSecurityProfileBehaviorsRequest: AWSEncodableShape {
        /// Specifies the behaviors that, when violated by a device (thing), cause an alert.
        public let behaviors: [Behavior]

        @inlinable
        public init(behaviors: [Behavior]) {
            self.behaviors = behaviors
        }

        public func validate(name: String) throws {
            try self.behaviors.forEach {
                try $0.validate(name: "\(name).behaviors[]")
            }
            try self.validate(self.behaviors, name: "behaviors", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case behaviors = "behaviors"
        }
    }

    public struct ValidateSecurityProfileBehaviorsResponse: AWSDecodableShape {
        /// True if the behaviors were valid.
        public let valid: Bool?
        /// The list of any errors found in the behaviors.
        public let validationErrors: [ValidationError]?

        @inlinable
        public init(valid: Bool? = nil, validationErrors: [ValidationError]? = nil) {
            self.valid = valid
            self.validationErrors = validationErrors
        }

        private enum CodingKeys: String, CodingKey {
            case valid = "valid"
            case validationErrors = "validationErrors"
        }
    }

    public struct ValidationError: AWSDecodableShape {
        /// The description of an error found in the behaviors.
        public let errorMessage: String?

        @inlinable
        public init(errorMessage: String? = nil) {
            self.errorMessage = errorMessage
        }

        private enum CodingKeys: String, CodingKey {
            case errorMessage = "errorMessage"
        }
    }

    public struct VersionUpdateByJobsConfig: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether the Job is enabled or not.
        public let enabled: Bool?
        /// The Amazon Resource Name (ARN) of the role that grants permission to the IoT jobs service to update the reserved named shadow when the job successfully completes.
        public let roleArn: String?

        @inlinable
        public init(enabled: Bool? = nil, roleArn: String? = nil) {
            self.enabled = enabled
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "enabled"
            case roleArn = "roleArn"
        }
    }

    public struct ViolationEvent: AWSDecodableShape {
        /// The behavior that was violated.
        public let behavior: Behavior?
        /// The value of the metric (the measurement).
        public let metricValue: MetricValue?
        /// The name of the security profile whose behavior was violated.
        public let securityProfileName: String?
        /// The name of the thing responsible for the violation event.
        public let thingName: String?
        /// The verification state of the violation (detect alarm).
        public let verificationState: VerificationState?
        /// The description of the verification state of the violation.
        public let verificationStateDescription: String?
        ///  The details of a violation event.
        public let violationEventAdditionalInfo: ViolationEventAdditionalInfo?
        /// The time the violation event occurred.
        public let violationEventTime: Date?
        /// The type of violation event.
        public let violationEventType: ViolationEventType?
        /// The ID of the violation event.
        public let violationId: String?

        @inlinable
        public init(behavior: Behavior? = nil, metricValue: MetricValue? = nil, securityProfileName: String? = nil, thingName: String? = nil, verificationState: VerificationState? = nil, verificationStateDescription: String? = nil, violationEventAdditionalInfo: ViolationEventAdditionalInfo? = nil, violationEventTime: Date? = nil, violationEventType: ViolationEventType? = nil, violationId: String? = nil) {
            self.behavior = behavior
            self.metricValue = metricValue
            self.securityProfileName = securityProfileName
            self.thingName = thingName
            self.verificationState = verificationState
            self.verificationStateDescription = verificationStateDescription
            self.violationEventAdditionalInfo = violationEventAdditionalInfo
            self.violationEventTime = violationEventTime
            self.violationEventType = violationEventType
            self.violationId = violationId
        }

        private enum CodingKeys: String, CodingKey {
            case behavior = "behavior"
            case metricValue = "metricValue"
            case securityProfileName = "securityProfileName"
            case thingName = "thingName"
            case verificationState = "verificationState"
            case verificationStateDescription = "verificationStateDescription"
            case violationEventAdditionalInfo = "violationEventAdditionalInfo"
            case violationEventTime = "violationEventTime"
            case violationEventType = "violationEventType"
            case violationId = "violationId"
        }
    }

    public struct ViolationEventAdditionalInfo: AWSDecodableShape {
        ///  The sensitivity of anomalous behavior evaluation. Can be Low, Medium, or High.
        public let confidenceLevel: ConfidenceLevel?

        @inlinable
        public init(confidenceLevel: ConfidenceLevel? = nil) {
            self.confidenceLevel = confidenceLevel
        }

        private enum CodingKeys: String, CodingKey {
            case confidenceLevel = "confidenceLevel"
        }
    }

    public struct ViolationEventOccurrenceRange: AWSEncodableShape & AWSDecodableShape {
        ///  The end date and time of a time period in which violation events occurred.
        public let endTime: Date
        ///  The start date and time of a time period in which violation events occurred.
        public let startTime: Date

        @inlinable
        public init(endTime: Date, startTime: Date) {
            self.endTime = endTime
            self.startTime = startTime
        }

        private enum CodingKeys: String, CodingKey {
            case endTime = "endTime"
            case startTime = "startTime"
        }
    }

    public struct VpcDestinationConfiguration: AWSEncodableShape {
        /// The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).
        public let roleArn: String
        /// The security groups of the VPC destination.
        public let securityGroups: [String]?
        /// The subnet IDs of the VPC destination.
        public let subnetIds: [String]
        /// The ID of the VPC.
        public let vpcId: String

        @inlinable
        public init(roleArn: String, securityGroups: [String]? = nil, subnetIds: [String], vpcId: String) {
            self.roleArn = roleArn
            self.securityGroups = securityGroups
            self.subnetIds = subnetIds
            self.vpcId = vpcId
        }

        private enum CodingKeys: String, CodingKey {
            case roleArn = "roleArn"
            case securityGroups = "securityGroups"
            case subnetIds = "subnetIds"
            case vpcId = "vpcId"
        }
    }

    public struct VpcDestinationProperties: AWSDecodableShape {
        /// The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).
        public let roleArn: String?
        /// The security groups of the VPC destination.
        public let securityGroups: [String]?
        /// The subnet IDs of the VPC destination.
        public let subnetIds: [String]?
        /// The ID of the VPC.
        public let vpcId: String?

        @inlinable
        public init(roleArn: String? = nil, securityGroups: [String]? = nil, subnetIds: [String]? = nil, vpcId: String? = nil) {
            self.roleArn = roleArn
            self.securityGroups = securityGroups
            self.subnetIds = subnetIds
            self.vpcId = vpcId
        }

        private enum CodingKeys: String, CodingKey {
            case roleArn = "roleArn"
            case securityGroups = "securityGroups"
            case subnetIds = "subnetIds"
            case vpcId = "vpcId"
        }
    }

    public struct VpcDestinationSummary: AWSDecodableShape {
        /// The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).
        public let roleArn: String?
        /// The security groups of the VPC destination.
        public let securityGroups: [String]?
        /// The subnet IDs of the VPC destination.
        public let subnetIds: [String]?
        /// The ID of the VPC.
        public let vpcId: String?

        @inlinable
        public init(roleArn: String? = nil, securityGroups: [String]? = nil, subnetIds: [String]? = nil, vpcId: String? = nil) {
            self.roleArn = roleArn
            self.securityGroups = securityGroups
            self.subnetIds = subnetIds
            self.vpcId = vpcId
        }

        private enum CodingKeys: String, CodingKey {
            case roleArn = "roleArn"
            case securityGroups = "securityGroups"
            case subnetIds = "subnetIds"
            case vpcId = "vpcId"
        }
    }
}

// MARK: - Errors

/// Error enum for IoT
public struct IoTErrorType: AWSErrorType {
    enum Code: String {
        case certificateConflictException = "CertificateConflictException"
        case certificateStateException = "CertificateStateException"
        case certificateValidationException = "CertificateValidationException"
        case conflictException = "ConflictException"
        case conflictingResourceUpdateException = "ConflictingResourceUpdateException"
        case deleteConflictException = "DeleteConflictException"
        case indexNotReadyException = "IndexNotReadyException"
        case internalException = "InternalException"
        case internalFailureException = "InternalFailureException"
        case internalServerException = "InternalServerException"
        case invalidAggregationException = "InvalidAggregationException"
        case invalidQueryException = "InvalidQueryException"
        case invalidRequestException = "InvalidRequestException"
        case invalidResponseException = "InvalidResponseException"
        case invalidStateTransitionException = "InvalidStateTransitionException"
        case limitExceededException = "LimitExceededException"
        case malformedPolicyException = "MalformedPolicyException"
        case notConfiguredException = "NotConfiguredException"
        case registrationCodeValidationException = "RegistrationCodeValidationException"
        case resourceAlreadyExistsException = "ResourceAlreadyExistsException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case resourceRegistrationFailureException = "ResourceRegistrationFailureException"
        case serviceQuotaExceededException = "ServiceQuotaExceededException"
        case serviceUnavailableException = "ServiceUnavailableException"
        case sqlParseException = "SqlParseException"
        case taskAlreadyExistsException = "TaskAlreadyExistsException"
        case throttlingException = "ThrottlingException"
        case transferAlreadyCompletedException = "TransferAlreadyCompletedException"
        case transferConflictException = "TransferConflictException"
        case unauthorizedException = "UnauthorizedException"
        case validationException = "ValidationException"
        case versionConflictException = "VersionConflictException"
        case versionsLimitExceededException = "VersionsLimitExceededException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize IoT
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// Unable to verify the CA certificate used to sign the device certificate you are attempting to register. This is happens when you have registered more than one CA certificate that has the same subject field and public key.
    public static var certificateConflictException: Self { .init(.certificateConflictException) }
    /// The certificate operation is not allowed.
    public static var certificateStateException: Self { .init(.certificateStateException) }
    /// The certificate is invalid.
    public static var certificateValidationException: Self { .init(.certificateValidationException) }
    /// The request conflicts with the current state of the resource.
    public static var conflictException: Self { .init(.conflictException) }
    /// A conflicting resource update exception. This exception is thrown when two pending updates cause a conflict.
    public static var conflictingResourceUpdateException: Self { .init(.conflictingResourceUpdateException) }
    /// You can't delete the resource because it is attached to one or more resources.
    public static var deleteConflictException: Self { .init(.deleteConflictException) }
    /// The index is not ready.
    public static var indexNotReadyException: Self { .init(.indexNotReadyException) }
    /// An unexpected error has occurred.
    public static var internalException: Self { .init(.internalException) }
    /// An unexpected error has occurred.
    public static var internalFailureException: Self { .init(.internalFailureException) }
    /// Internal error from the service that indicates an unexpected error or that the service is unavailable.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// The aggregation is invalid.
    public static var invalidAggregationException: Self { .init(.invalidAggregationException) }
    /// The query is invalid.
    public static var invalidQueryException: Self { .init(.invalidQueryException) }
    /// The request is not valid.
    public static var invalidRequestException: Self { .init(.invalidRequestException) }
    /// The response is invalid.
    public static var invalidResponseException: Self { .init(.invalidResponseException) }
    /// An attempt was made to change to an invalid state, for example by deleting a job or a job execution which is "IN_PROGRESS" without setting the force parameter.
    public static var invalidStateTransitionException: Self { .init(.invalidStateTransitionException) }
    /// A limit has been exceeded.
    public static var limitExceededException: Self { .init(.limitExceededException) }
    /// The policy documentation is not valid.
    public static var malformedPolicyException: Self { .init(.malformedPolicyException) }
    /// The resource is not configured.
    public static var notConfiguredException: Self { .init(.notConfiguredException) }
    /// The registration code is invalid.
    public static var registrationCodeValidationException: Self { .init(.registrationCodeValidationException) }
    /// The resource already exists.
    public static var resourceAlreadyExistsException: Self { .init(.resourceAlreadyExistsException) }
    /// The specified resource does not exist.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// The resource registration failed.
    public static var resourceRegistrationFailureException: Self { .init(.resourceRegistrationFailureException) }
    /// Service quota has been exceeded.
    public static var serviceQuotaExceededException: Self { .init(.serviceQuotaExceededException) }
    /// The service is temporarily unavailable.
    public static var serviceUnavailableException: Self { .init(.serviceUnavailableException) }
    /// The Rule-SQL expression can't be parsed correctly.
    public static var sqlParseException: Self { .init(.sqlParseException) }
    ///  This exception occurs if you attempt to start a task with the same task-id as an existing task but with a different clientRequestToken.
    public static var taskAlreadyExistsException: Self { .init(.taskAlreadyExistsException) }
    /// The rate exceeds the limit.
    public static var throttlingException: Self { .init(.throttlingException) }
    /// You can't revert the certificate transfer because the transfer is already complete.
    public static var transferAlreadyCompletedException: Self { .init(.transferAlreadyCompletedException) }
    /// You can't transfer the certificate because authorization policies are still attached.
    public static var transferConflictException: Self { .init(.transferConflictException) }
    /// You are not authorized to perform this operation.
    public static var unauthorizedException: Self { .init(.unauthorizedException) }
    /// The request is not valid.
    public static var validationException: Self { .init(.validationException) }
    /// An exception thrown when the version of an entity specified with the expectedVersion parameter does not match the latest version in the system.
    public static var versionConflictException: Self { .init(.versionConflictException) }
    /// The number of policy versions exceeds the limit.
    public static var versionsLimitExceededException: Self { .init(.versionsLimitExceededException) }
}

extension IoTErrorType: AWSServiceErrorType {
    public static let errorCodeMap: [String: AWSErrorShape.Type] = [
        "ConflictException": IoT.ConflictException.self,
        "ResourceAlreadyExistsException": IoT.ResourceAlreadyExistsException.self
    ]
}

extension IoTErrorType: Equatable {
    public static func == (lhs: IoTErrorType, rhs: IoTErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension IoTErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
